Systems and methods for deep learning-based shopper tracking

ABSTRACT

Systems and techniques are provided for tracking puts and takes of inventory items by subjects in an area of real space. A plurality of cameras with overlapping fields of view produce respective sequences of images of corresponding fields of view in the real space. In one embodiment, the system includes first image processors, including subject image recognition engines, receiving corresponding sequences of images from the plurality of cameras. The first image processors process images to identify subjects represented in the images in the corresponding sequences of images. The system includes second image processors, including background image recognition engines, receiving corresponding sequences of images from the plurality of cameras. The second image processors mask the identified subjects to generate masked images. Following this, the second image processors process the masked images to identify and classify background changes represented in the images in the corresponding sequences of images.

PRIORITY APPLICATION

This application is a continuation of U.S. patent application Ser. No.16/256,361 filed 24 Jan. 2019 (now U.S. Pat. No. 10,474,993), which is acontinuation of U.S. patent application Ser. No. 15/945,473 filed 4 Apr.2018 (now U.S. Pat. No. 10,474,988), which is a continuation-in-part ofU.S. patent application Ser. No. 15/907,112 filed 27 Feb. 2018 (now U.S.Pat. No. 10,133,933), which is a continuation-in-part of U.S. patentapplication Ser. No. 15/847,796 filed 19 Dec. 2017 (now U.S. Pat. No.10,055,853), which claims benefit of U.S. Provisional Patent ApplicationNo. 62/542,077, filed 7 Aug. 2017, which applications are incorporatedherein by reference.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains materialthat is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

REFERENCE TO COMPUTER PROGRAM LISTING APPENDIX

A computer program listing appendix (Copyright, Standard Cognition,Inc.) submitted electronically via the EFS-Web in ASCII text accompaniesthis application and is incorporated by reference. The name of the ASCIItext file is “STCG_Computer_Program_Appx_annotated” created on 6 Mar.2018 and is 22,606 bytes.

BACKGROUND Field

The present invention relates to systems that identify and track putsand takes of items by subjects in real space.

Description of Related Art

A difficult problem in image processing arises when images from multiplecameras disposed over large spaces are used to identify and trackactions of subjects.

Tracking actions of subjects within an area of real space, such as apeople in a shopping store, present many technical challenges. Forexample, consider such an image processing system deployed in a shoppingstore with multiple customers moving in aisles between the shelves andopen spaces within the shopping store. Customers take items from shelvesand put those in their respective shopping carts or baskets. Customersmay also put items on the shelf, if they do not want the item.

While the customers are performing these actions, different portions ofcustomers and different portions of the shelves or other displayconfigurations holding inventory of the store will be occluded in imagesfrom different cameras because of the presence of other customers,shelves, and product displays, etc. Also, there can be many customers inthe store at any given time, making it difficult to identify and trackindividuals and their actions over time.

It is desirable to provide a system that can more effectively andautomatically identify and track put and take actions of subjects inlarge spaces.

SUMMARY

A system, and method for operating a system, are provided for trackingchanges by subjects, such as persons, in an area of real space usingimage processing. This function of tracking changes by image processingpresents a complex problem of computer engineering, relating to the typeof image data to be processed, what processing of the image data toperform, and how to determine actions from the image data with highreliability. The system described herein can perform these functionsusing only images from cameras disposed overhead in the real space, sothat no retrofitting of store shelves and floor space with sensors andthe like is required for deployment in a given setting.

A system and method are provided for tracking put and takes of inventoryitems by subjects in an area of real space including inventory displaystructures that comprise using a plurality of cameras disposed above theinventory display structures to produce respective sequences of imagesof inventory display structures in corresponding fields of view in thereal space, the field of view of each camera overlapping with the fieldof view of at least one other camera in the plurality of cameras. Usingthese sequences of images, a system and method are described fordetecting puts and takes of inventory items by identifying semanticallysignificant changes in the sequences of images relating to inventoryitems on inventory display structures and associating the semanticallysignificant changes with subjects represented in the sequences ofimages.

A system and method are provided for tracking put and takes of inventoryitems by subjects in an area of real space, that comprise using aplurality of cameras disposed above the inventory display structures toproduce respective sequences of images of inventory display structuresin corresponding fields of view in the real space, the field of view ofeach camera overlapping with the field of view of at least one othercamera in the plurality of cameras. Using these sequences of images, asystem and method are described for detecting puts and takes ofinventory items by identifying gestures of subjects and inventory itemsassociated with the gestures by processing foreground data in thesequences of images.

Also, a system and method are described that combines foregroundprocessing and background processing in the same sequences of images. Inthis combined approach, the system and method provided include usingthese sequences of images for detecting puts and takes of inventoryitems by identifying gestures of subjects and inventory items associatedwith the gestures by processing foreground data in the sequences ofimages; and using these sequences of images for detecting puts and takesof inventory items by identifying semantically significant changes inthe sequences of images relating to inventory items on inventory displaystructures by processing background data in the sequences of images, andassociating the semantically significant changes with subjectsrepresented in the sequences of images.

In an embodiment described herein, the system uses a plurality ofcameras to produce respective sequences of images of correspondingfields of view in the real space. The field of view of each cameraoverlaps with the field of view of at least one other camera in theplurality of cameras. The system includes first image processors,including subject image recognition engines, receiving correspondingsequences of images from the plurality of cameras. The first imagesprocessors process images to identify subjects represented in the imagesin the corresponding sequences of images. The system further includes,second image processors, including background image recognition engines,receiving corresponding sequences of images from the plurality ofcameras. The second image processors mask the identified subjects togenerate masked images, and process the masked images to identify andclassify background changes represented in the images in thecorresponding sequences of images.

In one embodiment, the background image recognition engines compriseconvolutional neural networks. The system includes logic to associateidentified background changes with identified subjects.

In one embodiment, the second image processors include a backgroundimage store to store background images for corresponding sequences ofimages. The second image processors further include mask logic toprocess images in the sequences of images to replace foreground imagedata representing the identified subjects with background image data.The background image data is collected from the background images forthe corresponding sequences of images to provide the masked images.

In one embodiment, the mask logic combines sets of N masked images inthe sequences of images to generate sequences of factored images foreach camera. The second image processors identify and classifybackground changes by processing the sequence of factored images.

In one embodiment, the second image processors include logic to producechange data structures for the corresponding sequences of images. Thechange data structures include coordinates in the masked images ofidentified background changes, identifiers of an inventory item subjectof the identified background changes and classifications of theidentified background changes. The second image processors furtherinclude coordination logic to process change data structures from setsof cameras having overlapping fields of view to locate the identifiedbackground changes in real space.

In one embodiment, the classifications of identified background changesin the change data structures indicate whether the identified inventoryitem has been added or removed relative to the background image.

In another embodiment, the classifications of identified backgroundchanges in the change data structures indicate whether the identifiedinventory item has been added or removed relative to the backgroundimage. The system further includes logic to associate background changeswith identified subjects. Finally, the system includes the logic to makedetections of takes of inventory items by the identified subjects and ofputs of inventory items on inventory display structures by theidentified subjects.

In another embodiment, the system includes logic to associate backgroundchanges with identified subjects. The system further includes the logicto make detections of takes of inventory items by the identifiedsubjects and of puts of inventory items on inventory display structuresby the identified subjects.

The system can include third image processors as described herein,including foreground image recognition engines, receiving correspondingsequences of images from the plurality of cameras. The third imageprocessors process images to identify and classify foreground changesrepresented in the images in the corresponding sequences of images.

In a system including plural image recognition engines, such as bothforeground and background image recognition engines, the system can makea first set of detections of takes of inventory items by the identifiedsubjects and of puts of inventory items on inventory display structuresby the identified subjects, and a second set of detections of takes ofinventory items by the identified subjects and of puts of inventoryitems on inventory display structures by the identified subjects.Selection logic to process the first and second sets of detections canbe used to generate log data structures. The log data structures includelists of inventory items for identified subjects.

In embodiments described herein, the sequences of images from cameras inthe plurality of cameras are synchronized. The same cameras and the samesequences of images are used by both the foreground and background imageprocessors in one preferred implementation. As a result, redundantdetections of puts and takes of inventory items are made using the sameinput data allowing for high confidence, and high accuracy, in theresulting data.

In one technology described herein, the system comprises logic to detectputs and takes of inventory items by identifying gestures of subjectsand inventory items associated with the gestures represented in thesequences of images. This can be done using foreground image recognitionengines in coordination with subject image recognition engines asdescribed herein.

In another technology described herein, the system comprises logic todetect puts and takes of inventory items by identifying semanticallysignificant changes in inventory items on inventory display structures,such as shelves, over time and associating the semantically significantchanges with subjects represented in the sequences of images. This canbe done using background image recognition engines in coordination withsubject image recognition engines as described herein.

In systems applying technology described herein, both gesture analysisand semantic difference analysis can be combined, and executed on thesame sequences of synchronized images from an array of cameras.

Methods and computer program products which can be executed by computersystems are also described herein.

Other aspects and advantages of the present invention can be seen onreview of the drawings, the detailed description and the claims, whichfollow.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an architectural level schematic of a system in whicha tracking engine tracks subjects using joint data generated by imagerecognition engines.

FIG. 2 is a side view of an aisle in a shopping store illustrating acamera arrangement.

FIG. 3 is a top view of the aisle of FIG. 2 in a shopping storeillustrating a camera arrangement.

FIG. 4 is a camera and computer hardware arrangement configured forhosting an image recognition engine of FIG. 1.

FIG. 5 illustrates a convolutional neural network illustratingidentification of joints in an image recognition engine of FIG. 1.

FIG. 6 shows an example data structure for storing joint information.

FIG. 7 illustrates the tracking engine of FIG. 1 with a global metriccalculator.

FIG. 8 shows an example data structure for storing a subject includingthe information of associated joints.

FIG. 9 is a flowchart illustrating process steps for tracking subjectsby the system of FIG. 1.

FIG. 10 is a flowchart showing more detailed process steps for a cameracalibration step of FIG. 9.

FIG. 11 is a flowchart showing more detailed process steps for a videoprocess step of FIG. 9.

FIG. 12A is a flowchart showing a first part of more detailed processsteps for the scene process of FIG. 9.

FIG. 12B is a flowchart showing a second part of more detailed processsteps for the scene process of FIG. 9.

FIG. 13 is an illustration of an environment in which an embodiment ofthe system of FIG. 1 is used.

FIG. 14 is an illustration of video and scene processes in an embodimentof the system of FIG. 1.

FIG. 15a is a schematic showing a pipeline with multiple convolutionalneural networks (CNNs) including joints-CNN, WhatCNN and WhenCNN togenerate a shopping cart data structure per subject in the real space.

FIG. 15b shows multiple image channels from multiple cameras andcoordination logic for the subjects and their respective shopping cartdata structures.

FIG. 16 is a flowchart illustrating process steps for identifying andupdating subjects in the real space.

FIG. 17 is a flowchart showing process steps for processing hand jointsof subjects to identify inventory items.

FIG. 18 is a flowchart showing process steps for time series analysis ofinventory items per hand joint to create a shopping cart data structureper subject.

FIG. 19 is an illustration of a WhatCNN model in an embodiment of thesystem of FIG. 15 a.

FIG. 20 is an illustration of a WhenCNN model in an embodiment of thesystem of FIG. 15 a.

FIG. 21 presents an example architecture of a WhatCNN model identifyingthe dimensionality of convolutional layers.

FIG. 22 presents a high level block diagram of an embodiment of aWhatCNN model for classification of hand images.

FIG. 23 presents details of a first block of the high level blockdiagram of a WhatCNN model presented in FIG. 22.

FIG. 24 presents operators in a fully connected layer in the exampleWhatCNN model presented in FIG. 22.

FIG. 25 is an example name of an image file stored as part of thetraining data set for a WhatCNN model.

FIG. 26 is a high level architecture of a system for tracking changes bysubjects in an area of real space in which a selection logic selectsbetween a first detection using background semantic diffing and aredundant detection using foreground region proposals.

FIG. 27 presents components of subsystems implementing the system ofFIG. 26.

FIG. 28A is a flowchart showing a first part of detailed process stepsfor determining inventory events and generation of the shopping cartdata structure.

FIG. 28B is a flowchart showing a second part of detailed process stepsfor determining inventory events and generation of the shopping cartdata structure.

DETAILED DESCRIPTION

The following description is presented to enable any person skilled inthe art to make and use the invention, and is provided in the context ofa particular application and its requirements. Various modifications tothe disclosed embodiments will be readily apparent to those skilled inthe art, and the general principles defined herein may be applied toother embodiments and applications without departing from the spirit andscope of the present invention. Thus, the present invention is notintended to be limited to the embodiments shown but is to be accordedthe widest scope consistent with the principles and features disclosedherein.

System Overview

A system and various implementations of the subject technology isdescribed with reference to FIGS. 1-28A/28B. The system and processesare described with reference to FIG. 1, an architectural level schematicof a system in accordance with an implementation. Because FIG. 1 is anarchitectural diagram, certain details are omitted to improve theclarity of the description.

The discussion of FIG. 1 is organized as follows. First, the elements ofthe system are described, followed by their interconnections. Then, theuse of the elements in the system is described in greater detail.

FIG. 1 provides a block diagram level illustration of a system 100. Thesystem 100 includes cameras 114, network nodes hosting image recognitionengines 112 a, 112 b, and 112 n, a tracking engine 110 deployed in anetwork node (or nodes) on the network, a calibrator 120, a subjectdatabase 140, a training database 150, a heuristics database 160 forjoints heuristics, for put and take heuristics, and other heuristics forcoordinating and combining the outputs of multiple image recognitionengines as described below, a calibration database 170, and acommunication network or networks 181. The network nodes can host onlyone image recognition engine, or several image recognition engines asdescribed herein. The system can also include an inventory database andother supporting data.

As used herein, a network node is an addressable hardware device orvirtual device that is attached to a network, and is capable of sending,receiving, or forwarding information over a communications channel to orfrom other network nodes. Examples of electronic devices which can bedeployed as hardware network nodes include all varieties of computers,workstations, laptop computers, handheld computers, and smartphones.Network nodes can be implemented in a cloud-based server system. Morethan one virtual device configured as a network node can be implementedusing a single physical device.

For the sake of clarity, only three network nodes hosting imagerecognition engines are shown in the system 100. However, any number ofnetwork nodes hosting image recognition engines can be connected to thetracking engine 110 through the network(s) 181. Also, an imagerecognition engine, a tracking engine and other processing enginesdescribed herein can execute using more than one network node in adistributed architecture.

The interconnection of the elements of system 100 will now be described.Network(s) 181 couples the network nodes 101 a, 101 b, and 101 c,respectively, hosting image recognition engines 112 a, 112 b, and 112 n,the network node 102 hosting the tracking engine 110, the calibrator120, the subject database 140, the training database 150, the jointsheuristics database 160, and the calibration database 170. Cameras 114are connected to the tracking engine 110 through network nodes hostingimage recognition engines 112 a, 112 b, and 112 n. In one embodiment,the cameras 114 are installed in a shopping store (such as asupermarket) such that sets of cameras 114 (two or more) withoverlapping fields of view are positioned over each aisle to captureimages of real space in the store. In FIG. 1, two cameras are arrangedover aisle 116 a, two cameras are arranged over aisle 116 b, and threecameras are arranged over aisle 116 n. The cameras 114 are installedover aisles with overlapping fields of view. In such an embodiment, thecameras are configured with the goal that customers moving in the aislesof the shopping store are present in the field of view of two or morecameras at any moment in time.

Cameras 114 can be synchronized in time with each other, so that imagesare captured at the same time, or close in time, and at the same imagecapture rate. The cameras 114 can send respective continuous streams ofimages at a predetermined rate to network nodes hosting imagerecognition engines 112 a-112 n. Images captured in all the camerascovering an area of real space at the same time, or close in time, aresynchronized in the sense that the synchronized images can be identifiedin the processing engines as representing different views of subjectshaving fixed positions in the real space. For example, in oneembodiment, the cameras send image frames at the rates of 30 frames persecond (fps) to respective network nodes hosting image recognitionengines 112 a-112 n. Each frame has a timestamp, identity of the camera(abbreviated as “camera_id”), and a frame identity (abbreviated as“frame_id”) along with the image data.

Cameras installed over an aisle are connected to respective imagerecognition engines. For example, in FIG. 1, the two cameras installedover the aisle 116 a are connected to the network node 101 a hosting animage recognition engine 112 a. Likewise, the two cameras installed overaisle 116 b are connected to the network node 101 b hosting an imagerecognition engine 112 b. Each image recognition engine 112 a-112 nhosted in a network node or nodes 101 a-101 n, separately processes theimage frames received from one camera each in the illustrated example.

In one embodiment, each image recognition engine 112 a, 112 b, and 112 nis implemented as a deep learning algorithm such as a convolutionalneural network (abbreviated CNN). In such an embodiment, the CNN istrained using a training database 150. In an embodiment describedherein, image recognition of subjects in the real space is based onidentifying and grouping joints recognizable in the images, where thegroups of joints can be attributed to an individual subject. For thisjoints based analysis, the training database 150 has a large collectionof images for each of the different types of joints for subjects. In theexample embodiment of a shopping store, the subjects are the customersmoving in the aisles between the shelves. In an example embodiment,during training of the CNN, the system 100 is referred to as a “trainingsystem”. After training the CNN using the training database 150, the CNNis switched to production mode to process images of customers in theshopping store in real time. In an example embodiment, duringproduction, the system 100 is referred to as a runtime system (alsoreferred to as an inference system). The CNN in each image recognitionengine produces arrays of joints data structures for images in itsrespective stream of images. In an embodiment as described herein, anarray of joints data structures is produced for each processed image, sothat each image recognition engine 112 a-112 n produces an output streamof arrays of joints data structures. These arrays of joints datastructures from cameras having overlapping fields of view are furtherprocessed to form groups of joints, and to identify such groups ofjoints as subjects.

The cameras 114 are calibrated before switching the CNN to productionmode. The calibrator 120 calibrates the cameras and stores thecalibration data in the calibration database 170.

The tracking engine 110, hosted on the network node 102, receivescontinuous streams of arrays of joints data structures for the subjectsfrom image recognition engines 112 a-112 n. The tracking engine 110processes the arrays of joints data structures and translates thecoordinates of the elements in the arrays of joints data structurescorresponding to images in different sequences into candidate jointshaving coordinates in the real space. For each set of synchronizedimages, the combination of candidate joints identified throughout thereal space can be considered, for the purposes of analogy, to be like agalaxy of candidate joints. For each succeeding point in time, movementof the candidate joints is recorded so that the galaxy changes overtime. The output of the tracking engine 110 is stored in the subjectdatabase 140.

The tracking engine 110 uses logic to identify groups or sets ofcandidate joints having coordinates in real space as subjects in thereal space. For the purposes of analogy, each set of candidate points islike a constellation of candidate joints at each point in time. Theconstellations of candidate joints can move over time.

The logic to identify sets of candidate joints comprises heuristicfunctions based on physical relationships amongst joints of subjects inreal space. These heuristic functions are used to identify sets ofcandidate joints as subjects. The heuristic functions are stored inheuristics database 160. The output of the tracking engine 110 is storedin the subject database 140. Thus, the sets of candidate joints compriseindividual candidate joints that have relationships according to theheuristic parameters with other individual candidate joints and subsetsof candidate joints in a given set that has been identified, or can beidentified, as an individual subject.

The actual communication path through the network 181 can bepoint-to-point over public and/or private networks. The communicationscan occur over a variety of networks 181, e.g., private networks, VPN,MPLS circuit, or Internet, and can use appropriate applicationprogramming interfaces (APIs) and data interchange formats, e.g.,Representational State Transfer (REST), JavaScript™ Object Notation(JSON), Extensible Markup Language (XML), Simple Object Access Protocol(SOAP), Java™ Message Service (JMS), and/or Java Platform Module System.All of the communications can be encrypted. The communication isgenerally over a network such as a LAN (local area network), WAN (widearea network), telephone network (Public Switched Telephone Network(PSTN), Session Initiation Protocol (SIP), wireless network,point-to-point network, star network, token ring network, hub network,Internet, inclusive of the mobile Internet, via protocols such as EDGE,3G, 4G LTE, Wi-Fi, and WiMAX. Additionally, a variety of authorizationand authentication techniques, such as username/password, OpenAuthorization (OAuth), Kerberos, SecureID, digital certificates andmore, can be used to secure the communications.

The technology disclosed herein can be implemented in the context of anycomputer-implemented system including a database system, a multi-tenantenvironment, or a relational database implementation like an Oracle™compatible database implementation, an IBM DB2 Enterprise Server™compatible relational database implementation, a MySQL™ or PostgreSQL™compatible relational database implementation or a Microsoft SQL Server™compatible relational database implementation or a NoSQL™ non-relationaldatabase implementation such as a Vampire™ compatible non-relationaldatabase implementation, an Apache Cassandra™ compatible non-relationaldatabase implementation, a BigTable™ compatible non-relational databaseimplementation or an HBase™ or DynamoDB™ compatible non-relationaldatabase implementation. In addition, the technology disclosed can beimplemented using different programming models like MapReduce™, bulksynchronous programming, MPI primitives, etc. or different scalablebatch and stream management systems like Apache Storm™, Apache Spark™,Apache Kafka™, Apache Flink™, Truviso™, Amazon Elasticsearch Service™,Amazon Web Services™ (AWS), IBM Info-Sphere™, Borealis™, and Yahoo! S4™.

Camera Arrangement

The cameras 114 are arranged to track multi joint entities (or subjects)in a three-dimensional (abbreviated as 3D) real space. In the exampleembodiment of the shopping store, the real space can include the area ofthe shopping store where items for sale are stacked in shelves. A pointin the real space can be represented by an (x, y, z) coordinate system.Each point in the area of real space for which the system is deployed iscovered by the fields of view of two or more cameras 114.

In a shopping store, the shelves and other inventory display structurescan be arranged in a variety of manners, such as along the walls of theshopping store, or in rows forming aisles or a combination of the twoarrangements. FIG. 2 shows an arrangement of shelves, forming an aisle116 a, viewed from one end of the aisle 116 a. Two cameras, camera A 206and camera B 208 are positioned over the aisle 116 a at a predetermineddistance from a roof 230 and a floor 220 of the shopping store above theinventory display structures such as shelves. The cameras 114 comprisecameras disposed over and having fields of view encompassing respectiveparts of the inventory display structures and floor area in the realspace. The coordinates in real space of members of a set of candidatejoints, identified as a subject, identify locations in the floor area ofthe subject. In the example embodiment of the shopping store, the realspace can include all of the floor 220 in the shopping store from whichinventory can be accessed. Cameras 114 are placed and oriented such thatareas of the floor 220 and shelves can be seen by at least two cameras.The cameras 114 also cover at least part of the shelves 202 and 204 andfloor space in front of the shelves 202 and 204. Camera angles areselected to have both steep perspective, straight down, and angledperspectives that give more full body images of the customers. In oneexample embodiment, the cameras 114 are configured at an eight (8) footheight or higher throughout the shopping store. FIG. 13 presents anillustration of such an embodiment.

In FIG. 2, the cameras 206 and 208 have overlapping fields of view,covering the space between a shelf A 202 and a shelf B 204 withoverlapping fields of view 216 and 218, respectively. A location in thereal space is represented as a (x, y, z) point of the real spacecoordinate system. “x” and “y” represent positions on a two-dimensional(2D) plane which can be the floor 220 of the shopping store. The value“z” is the height of the point above the 2D plane at floor 220 in oneconfiguration.

FIG. 3 illustrates the aisle 116 a viewed from the top of FIG. 2,further showing an example arrangement of the positions of cameras 206and 208 over the aisle 116 a. The cameras 206 and 208 are positionedcloser to opposite ends of the aisle 116 a. The camera A 206 ispositioned at a predetermined distance from the shelf A 202 and thecamera B 208 is positioned at a predetermined distance from the shelf B204. In another embodiment, in which more than two cameras arepositioned over an aisle, the cameras are positioned at equal distancesfrom each other. In such an embodiment, two cameras are positioned closeto the opposite ends and a third camera is positioned in the middle ofthe aisle. It is understood that a number of different cameraarrangements are possible.

Camera Calibration

The camera calibrator 120 performs two types of calibrations: internaland external. In internal calibration, the internal parameters of thecameras 114 are calibrated. Examples of internal camera parametersinclude focal length, principal point, skew, fisheye coefficients, etc.A variety of techniques for internal camera calibration can be used. Onesuch technique is presented by Zhang in “A flexible new technique forcamera calibration” published in IEEE Transactions on Pattern Analysisand Machine Intelligence, Volume 22, No. 11, November 2000.

In external calibration, the external camera parameters are calibratedin order to generate mapping parameters for translating the 2D imagedata into 3D coordinates in real space. In one embodiment, one subject,such as a person, is introduced into the real space. The subject movesthrough the real space on a path that passes through the field of viewof each of the cameras 114. At any given point in the real space, thesubject is present in the fields of view of at least two cameras forminga 3D scene. The two cameras, however, have a different view of the same3D scene in their respective two-dimensional (2D) image planes. Afeature in the 3D scene such as a left-wrist of the subject is viewed bytwo cameras at different positions in their respective 2D image planes.

A point correspondence is established between every pair of cameras withoverlapping fields of view for a given scene. Since each camera has adifferent view of the same 3D scene, a point correspondence is two pixellocations (one location from each camera with overlapping field of view)that represent the projection of the same point in the 3D scene. Manypoint correspondences are identified for each 3D scene using the resultsof the image recognition engines 112 a-112 n for the purposes of theexternal calibration. The image recognition engines identify theposition of a joint as (x, y) coordinates, such as row and columnnumbers, of pixels in the 2D image planes of respective cameras 114. Inone embodiment, a joint is one of 19 different types of joints of thesubject. As the subject moves through the fields of view of differentcameras, the tracking engine 110 receives (x, y) coordinates of each ofthe 19 different types of joints of the subject used for the calibrationfrom cameras 114 per image.

For example, consider an image from a camera A and an image from acamera B both taken at the same moment in time and with overlappingfields of view. There are pixels in an image from camera A thatcorrespond to pixels in a synchronized image from camera B. Considerthat there is a specific point of some object or surface in view of bothcamera A and camera B and that point is captured in a pixel of bothimage frames. In external camera calibration, a multitude of such pointsare identified and referred to as corresponding points. Since there isone subject in the field of view of camera A and camera B duringcalibration, key joints of this subject are identified, for example, thecenter of left wrist. If these key joints are visible in image framesfrom both camera A and camera B then it is assumed that these representcorresponding points. This process is repeated for many image frames tobuild up a large collection of corresponding points for all pairs ofcameras with overlapping fields of view. In one embodiment, images arestreamed off of all cameras at a rate of 30 FPS (frames per second) ormore and a resolution of 720 pixels in full RGB (red, green, and blue)color. These images are in the form of one-dimensional arrays (alsoreferred to as flat arrays).

The large number of images collected above for a subject can be used todetermine corresponding points between cameras with overlapping fieldsof view. Consider two cameras A and B with overlapping field of view.The plane passing through camera centers of cameras A and B and thejoint location (also referred to as feature point) in the 3D scene iscalled the “epipolar plane”. The intersection of the epipolar plane withthe 2D image planes of the cameras A and B defines the “epipolar line”.Given these corresponding points, a transformation is determined thatcan accurately map a corresponding point from camera A to an epipolarline in camera B's field of view that is guaranteed to intersect thecorresponding point in the image frame of camera B. Using the imageframes collected above for a subject, the transformation is generated.It is known in the art that this transformation is non-linear. Thegeneral form is furthermore known to require compensation for the radialdistortion of each camera's lens, as well as the non-linear coordinatetransformation moving to and from the projected space. In externalcamera calibration, an approximation to the ideal non-lineartransformation is determined by solving a non-linear optimizationproblem. This non-linear optimization function is used by the trackingengine 110 to identify the same joints in outputs (arrays of joints datastructures) of different image recognition engines 112 a-112 n,processing images of cameras 114 with overlapping fields of view. Theresults of the internal and external camera calibration are stored inthe calibration database 170.

A variety of techniques for determining the relative positions of thepoints in images of cameras 114 in the real space can be used. Forexample, Longuet-Higgins published, “A computer algorithm forreconstructing a scene from two projections” in Nature, Volume 293, 10Sep. 1981. This paper presents computing a three-dimensional structureof a scene from a correlated pair of perspective projections whenspatial relationship between the two projections is unknown. TheLonguet-Higgins paper presents a technique to determine the position ofeach camera in the real space with respect to other cameras.Additionally, their technique allows triangulation of a subject in thereal space, identifying the value of the z-coordinate (height from thefloor) using images from cameras 114 with overlapping fields of view. Anarbitrary point in the real space, for example, the end of a shelf inone corner of the real space, is designated as a (0, 0, 0) point on the(x, y, z) coordinate system of the real space.

In an embodiment of the technology, the parameters of the externalcalibration are stored in two data structures. The first data structurestores intrinsic parameters. The intrinsic parameters represent aprojective transformation from the 3D coordinates into 2D imagecoordinates. The first data structure contains intrinsic parameters percamera as shown below. The data values are all numeric floating pointnumbers. This data structure stores a 3×3 intrinsic matrix, representedas “K” and distortion coefficients. The distortion coefficients includesix radial distortion coefficients and two tangential distortioncoefficients. Radial distortion occurs when light rays bend more nearthe edges of a lens than they do at its optical center. Tangentialdistortion occurs when the lens and the image plane are not parallel.The following data structure shows values for the first camera only.Similar data is stored for all the cameras 114.

{ 1: { K: [[x, x, x], [x, x, x], [x, x, x]], distortion _coefficients:[x, x, x, x, x, x, x, x] }, ...... }

The second data structure stores per pair of cameras: a 3×3 fundamentalmatrix (F), a 3×3 essential matrix (E), a 3×4 projection matrix (P), a3×3 rotation matrix (R) and a 3×1 translation vector (t). This data isused to convert points in one camera's reference frame to anothercamera's reference frame. For each pair of cameras, eight homographycoefficients are also stored to map the plane of the floor 220 from onecamera to another. A fundamental matrix is a relationship between twoimages of the same scene that constrains where the projection of pointsfrom the scene can occur in both images. Essential matrix is also arelationship between two images of the same scene with the conditionthat the cameras are calibrated. The projection matrix gives a vectorspace projection from 3D real space to a subspace. The rotation matrixis used to perform a rotation in Euclidean space. Translation vector “t”represents a geometric transformation that moves every point of a figureor a space by the same distance in a given direction. Thehomography_floor_coefficients are used to combine images of features ofsubjects on the floor 220 viewed by cameras with overlapping fields ofviews. The second data structure is shown below. Similar data is storedfor all pairs of cameras. As indicated previously, the x's representsnumeric floating point numbers.

{ 1: { 2: { F: [[x, x, x], [x, x, x], [x, x, x]], E: [[x, x, x], [x, x,x], [x, x, x]], P: [[x, x, x, x], [x, x, x, x], [x, x, x, x]], R: [[x,x, x], [x, x, x], [x, x, x]], t: [x, x, x],homography_floor_coefficients: [x, x, x, x, x, x, x, x] } }, ....... }Network Configuration

FIG. 4 presents an architecture 400 of a network hosting imagerecognition engines. The system includes a plurality of network nodes101 a-101 n in the illustrated embodiment. In such an embodiment, thenetwork nodes are also referred to as processing platforms. Processingplatforms 101 a-101 n and cameras 412, 414, 416, . . . 418 are connectedto network(s) 481.

FIG. 4 shows a plurality of cameras 412, 414, 416, . . . 418 connectedto the network(s). A large number of cameras can be deployed inparticular systems. In one embodiment, the cameras 412 to 418 areconnected to the network(s) 481 using Ethernet-based connectors 422,424, 426, and 428, respectively. In such an embodiment, theEthernet-based connectors have a data transfer speed of 1 gigabit persecond, also referred to as Gigabit Ethernet. It is understood that inother embodiments, cameras 114 are connected to the network using othertypes of network connections which can have a faster or slower datatransfer rate than Gigabit Ethernet. Also, in alternative embodiments, aset of cameras can be connected directly to each processing platform,and the processing platforms can be coupled to a network.

Storage subsystem 430 stores the basic programming and data constructsthat provide the functionality of certain embodiments of the presentinvention. For example, the various modules implementing thefunctionality of a plurality of image recognition engines may be storedin storage subsystem 430. The storage subsystem 430 is an example of acomputer readable memory comprising a non-transitory data storagemedium, having computer instructions stored in the memory executable bya computer to perform the all or any combination of the data processingand image processing functions described herein, including logic toidentify changes in real space, to track subjects and to detect puts andtakes of inventory items in an area of real space by processes asdescribed herein. In other examples, the computer instructions can bestored in other types of memory, including portable memory, thatcomprise a non-transitory data storage medium or media, readable by acomputer.

These software modules are generally executed by a processor subsystem450. A host memory subsystem 432 typically includes a number of memoriesincluding a main random access memory (RAM) 434 for storage ofinstructions and data during program execution and a read-only memory(ROM) 436 in which fixed instructions are stored. In one embodiment, theRAM 434 is used as a buffer for storing video streams from the cameras114 connected to the platform 101 a.

A file storage subsystem 440 provides persistent storage for program anddata files. In an example embodiment, the storage subsystem 440 includesfour 120 Gigabyte (GB) solid state disks (SSD) in a RAID 0 (redundantarray of independent disks) arrangement identified by a numeral 442. Inthe example embodiment, in which CNN is used to identify joints ofsubjects, the RAID 0 442 is used to store training data. Duringtraining, the training data which is not in RAM 434 is read from RAID 0442. Similarly, when images are being recorded for training purposes,the data which is not in RAM 434 is stored in RAID 0 442. In the exampleembodiment, the hard disk drive (HDD) 446 is a 10 terabyte storage. Itis slower in access speed than the RAID 0 442 storage. The solid statedisk (SSD) 444 contains the operating system and related files for theimage recognition engine 112 a.

In an example configuration, three cameras 412, 414, and 416, areconnected to the processing platform 101 a. Each camera has a dedicatedgraphics processing unit GPU 1 462, GPU 2 464, and GPU 3 466, to processimages sent by the camera. It is understood that fewer than or more thanthree cameras can be connected per processing platform. Accordingly,fewer or more GPUs are configured in the network node so that eachcamera has a dedicated GPU for processing the image frames received fromthe camera. The processor subsystem 450, the storage subsystem 430 andthe GPUs 462, 464, and 466 communicate using the bus subsystem 454.

A number of peripheral devices such as a network interface subsystem,user interface output devices, and user interface input devices are alsoconnected to the bus subsystem 454 forming part of the processingplatform 101 a. These subsystems and devices are intentionally not shownin FIG. 4 to improve the clarity of the description. Although bussubsystem 454 is shown schematically as a single bus, alternativeembodiments of the bus subsystem may use multiple busses.

In one embodiment, the cameras 412 can be implemented using Chameleon31.3 MP Color USB3 Vision (Sony ICX445), having a resolution of 1288×964,a frame rate of 30 FPS, and at 1.3 MegaPixels per image, with VarifocalLens having a working distance (mm) of 300-∞, a field of view field ofview with a ⅓″ sensor of 98.2°-23.8°.

Convolutional Neural Network

The image recognition engines in the processing platforms receive acontinuous stream of images at a predetermined rate. In one embodiment,the image recognition engines comprise convolutional neural networks(abbreviated CNN).

FIG. 5 illustrates processing of image frames by a CNN referred to by anumeral 500. The input image 510 is a matrix consisting of image pixelsarranged in rows and columns. In one embodiment, the input image 510 hasa width of 1280 pixels, height of 720 pixels and 3 channels red, blue,and green also referred to as RGB. The channels can be imagined as three1280×720 two-dimensional images stacked over one another. Therefore, theinput image has dimensions of 1280×720×3 as shown in FIG. 5.

A 2×2 filter 520 is convolved with the input image 510. In thisembodiment, no padding is applied when the filter is convolved with theinput. Following this, a nonlinearity function is applied to theconvolved image. In the present embodiment, rectified linear unit (ReLU)activations are used. Other examples of nonlinear functions includesigmoid, hyperbolic tangent (tan h) and variations of ReLU such as leakyReLU. A search is performed to find hyper-parameter values. Thehyper-parameters are C₁, C₂, . . . C_(N) where C_(N) means the number ofchannels for convolution layer “N”. Typical values of N and C are shownin FIG. 5. There are twenty five (25) layers in the CNN as representedby N equals 25. The values of C are the number of channels in eachconvolution layer for layers 1 to 25. In other embodiments, additionalfeatures are added to the CNN 500 such as residual connections,squeeze-excitation modules, and multiple resolutions.

In typical CNNs used for image classification, the size of the image(width and height dimensions) is reduced as the image is processedthrough convolution layers. That is helpful in feature identification asthe goal is to predict a class for the input image. However, in theillustrated embodiment, the size of the input image (i.e. image widthand height dimensions) is not reduced, as the goal is to not only toidentify a joint (also referred to as a feature) in the image frame, butalso to identify its location in the image so it can be mapped tocoordinates in the real space. Therefore, as shown FIG. 5, the width andheight dimensions of the image remain unchanged as the processingproceeds through convolution layers of the CNN, in this example.

In one embodiment, the CNN 500 identifies one of the 19 possible jointsof the subjects at each element of the image. The possible joints can begrouped in two categories: foot joints and non-foot joints. The 19^(th)type of joint classification is for all non-joint features of thesubject (i.e. elements of the image not classified as a joint).

-   -   Foot Joints:        -   Ankle joint (left and right)    -   Non-foot Joints:        -   Neck        -   Nose        -   Eyes (left and right)        -   Ears (left and right)        -   Shoulders (left and right)        -   Elbows (left and right)        -   Wrists (left and right)        -   Hip (left and right)        -   Knees (left and right)    -   Not a joint

As can be seen, a “joint” for the purposes of this description is atrackable feature of a subject in the real space. A joint may correspondto physiological joints on the subjects, or other features such as theeye, or nose.

The first set of analyses on the stream of input images identifiestrackable features of subjects in real space. In one embodiment, this isreferred to as “joints analysis”. In such an embodiment, the CNN usedfor joints analysis is referred to as “joints CNN”. In one embodiment,the joints analysis is performed thirty times per second over thirtyframes per second received from the corresponding camera. The analysisis synchronized in time i.e., at 1/30^(th) of a second, images from allcameras 114 are analyzed in the corresponding joints CNNs to identifyjoints of all subjects in the real space. The results of this analysisof the images from a single moment in time from plural cameras is storedas a “snapshot”.

A snapshot can be in the form of a dictionary containing arrays ofjoints data structures from images of all cameras 114 at a moment intime, representing a constellation of candidate joints within the areaof real space covered by the system. In one embodiment, the snapshot isstored in the subject database 140.

In this example CNN, a softmax function is applied to every element ofthe image in the final layer of convolution layers 530. The softmaxfunction transforms a K-dimensional vector of arbitrary real values to aK-dimensional vector of real values in the range [0, 1] that add upto 1. In one embodiment, an element of an image is a single pixel. Thesoftmax function converts the 19-dimensional array (also referred to a19-dimensional vector) of arbitrary real values for each pixel to a19-dimensional confidence array of real values in the range [0, 1] thatadd up to 1. The 19 dimensions of a pixel in the image frame correspondto the 19 channels in the final layer of the CNN which furthercorrespond to 19 types of joints of the subjects.

A large number of picture elements can be classified as one of each ofthe 19 types of joints in one image depending on the number of subjectsin the field of view of the source camera for that image.

The image recognition engines 112 a-112 n process images to generateconfidence arrays for elements of the image. A confidence array for aparticular element of an image includes confidence values for aplurality of joint types for the particular element. Each one of theimage recognition engines 112 a-112 n, respectively, generates an outputmatrix 540 of confidence arrays per image. Finally, each imagerecognition engine generates arrays of joints data structurescorresponding to each output matrix 540 of confidence arrays per image.The arrays of joints data structures corresponding to particular imagesclassify elements of the particular images by joint type, time of theparticular image, and coordinates of the element in the particularimage. A joint type for the joints data structure of the particularelements in each image is selected based on the values of the confidencearray.

Each joint of the subjects can be considered to be distributed in theoutput matrix 540 as a heat map. The heat map can be resolved to showimage elements having the highest values (peak) for each joint type.Ideally, for a given picture element having high values of a particularjoint type, surrounding picture elements outside a range from the givenpicture element will have lower values for that joint type, so that alocation for a particular joint having that joint type can be identifiedin the image space coordinates. Correspondingly, the confidence arrayfor that image element will have the highest confidence value for thatjoint and lower confidence values for the remaining 18 types of joints.

In one embodiment, batches of images from each camera 114 are processedby respective image recognition engines. For example, six contiguouslytimestamped images are processed sequentially in a batch to takeadvantage of cache coherence. The parameters for one layer of the CNN500 are loaded in memory and applied to the batch of six image frames.Then the parameters for the next layer are loaded in memory and appliedto the batch of six images. This is repeated for all convolution layers530 in the CNN 500. The cache coherence reduces processing time andimproves performance of the image recognition engines.

In one such embodiment, referred to as three dimensional (3D)convolution, a further improvement in performance of the CNN 500 isachieved by sharing information across image frames in the batch. Thishelps in more precise identification of joints and reduces falsepositives. For examples, features in the image frames for which pixelvalues do not change across the multiple image frames in a given batchare likely static objects such as a shelf. The change of values for thesame pixel across image frames in a given batch indicates that thispixel is likely a joint. Therefore, the CNN 500 can focus more onprocessing that pixel to accurately identify the joint identified bythat pixel.

Joints Data Structure

The output of the CNN 500 is a matrix of confidence arrays for eachimage per camera. The matrix of confidence arrays is transformed into anarray of joints data structures. A joints data structure 600 as shown inFIG. 6 is used to store the information of each joint. The joints datastructure 600 identifies x and y positions of the element in theparticular image in the 2D image space of the camera from which theimage is received. A joint number identifies the type of jointidentified. For example, in one embodiment, the values range from 1 to19. A value of 1 indicates that the joint is a left-ankle, a value of 2indicates the joint is a right-ankle and so on. The type of joint isselected using the confidence array for that element in the outputmatrix 540. For example, in one embodiment, if the value correspondingto the left-ankle joint is highest in the confidence array for thatimage element, then the value of the joint number is “1”.

A confidence number indicates the degree of confidence of the CNN 500 inpredicting that joint. If the value of confidence number is high, itmeans the CNN is confident in its prediction. An integer-Id is assignedto the joints data structure to uniquely identify it. Following theabove mapping, the output matrix 540 of confidence arrays per image isconverted into an array of joints data structures for each image.

The image recognition engines 112 a-112 n receive the sequences ofimages from cameras 114 and process images to generate correspondingarrays of joints data structures as described above. An array of jointsdata structures for a particular image classifies elements of theparticular image by joint type, time of the particular image, and thecoordinates of the elements in the particular image. In one embodiment,the image recognition engines 112 a-112 n are convolutional neuralnetworks CNN 500, the joint type is one of the 19 types of joints of thesubjects, the time of the particular image is the timestamp of the imagegenerated by the source camera 114 for the particular image, and thecoordinates (x, y) identify the position of the element on a 2D imageplane.

In one embodiment, the joints analysis includes performing a combinationof k-nearest neighbors, mixture of Gaussians, various image morphologytransformations, and joints CNN on each input image. The resultcomprises arrays of joints data structures which can be stored in theform of a bit mask in a ring buffer that maps image numbers to bit masksat each moment in time.

Tracking Engine

The tracking engine 110 is configured to receive arrays of joints datastructures generated by the image recognition engines 112 a-112 ncorresponding to images in sequences of images from cameras havingoverlapping fields of view. The arrays of joints data structures perimage are sent by image recognition engines 112 a-112 n to the trackingengine 110 via the network(s) 181 as shown in FIG. 7. The trackingengine 110 translates the coordinates of the elements in the arrays ofjoints data structures corresponding to images in different sequencesinto candidate joints having coordinates in the real space. The trackingengine 110 comprises logic to identify sets of candidate joints havingcoordinates in real space (constellations of joints) as subjects in thereal space. In one embodiment, the tracking engine 110 accumulatesarrays of joints data structures from the image recognition engines forall the cameras at a given moment in time and stores this information asa dictionary in the subject database 140, to be used for identifying aconstellation of candidate joints. The dictionary can be arranged in theform of key-value pairs, where keys are camera ids and values are arraysof joints data structures from the camera. In such an embodiment, thisdictionary is used in heuristics-based analysis to determine candidatejoints and for assignment of joints to subjects. In such an embodiment,a high-level input, processing and output of the tracking engine 110 isillustrated in table 1.

TABLE 1 Inputs, processing and outputs from tracking engine 110 in anexample embodiment. Inputs Processing Output Arrays of joints dataCreate joints dictionary List of subjects structures per image and forReproject joint in the real space each joints data structure positionsin the fields of at a moment Unique ID view of cameras with in timeConfidence number overlapping fields of Joint number view to candidatejoints (x, y) position in image spaceGrouping Joints into Candidate Joints

The tracking engine 110 receives arrays of joints data structures alongtwo dimensions: time and space. Along the time dimension, the trackingengine receives sequentially timestamped arrays of joints datastructures processed by image recognition engines 112 a-112 n percamera. The joints data structures include multiple instances of thesame joint of the same subject over a period of time in images fromcameras having overlapping fields of view. The (x, y) coordinates of theelement in the particular image will usually be different insequentially timestamped arrays of joints data structures because of themovement of the subject to which the particular joint belongs. Forexample, twenty picture elements classified as left-wrist joints canappear in many sequentially timestamped images from a particular camera,each left-wrist joint having a position in real space that can bechanging or unchanging from image to image. As a result, twentyleft-wrist joints data structures 600 in many sequentially timestampedarrays of joints data structures can represent the same twenty joints inreal space over time.

Because multiple cameras having overlapping fields of view cover eachlocation in the real space, at any given moment in time, the same jointcan appear in images of more than one of the cameras 114. The cameras114 are synchronized in time, therefore, the tracking engine 110receives joints data structures for a particular joint from multiplecameras having overlapping fields of view, at any given moment in time.This is the space dimension, the second of the two dimensions: time andspace, along which the tracking engine 110 receives data in arrays ofjoints data structures.

The tracking engine 110 uses an initial set of heuristics stored in theheuristics database 160 to identify candidate joints data structuresfrom the arrays of joints data structures. The goal is to minimize aglobal metric over a period of time. A global metric calculator 702calculates the global metric. The global metric is a summation ofmultiple values described below. Intuitively, the value of the globalmetric is minimum when the joints in arrays of joints data structuresreceived by the tracking engine 110 along the time and space dimensionsare correctly assigned to respective subjects. For example, consider theembodiment of the shopping store with customers moving in the aisles. Ifthe left-wrist of a customer A is incorrectly assigned to a customer B,then the value of the global metric will increase. Therefore, minimizingthe global metric for each joint for each customer is an optimizationproblem. One option to solve this problem is to try all possibleconnections of joints. However, this can become intractable as thenumber of customers increases.

A second approach to solve this problem is to use heuristics to reducepossible combinations of joints identified as members of a set ofcandidate joints for a single subject. For example, a left-wrist jointcannot belong to a subject far apart in space from other joints of thesubject because of known physiological characteristics of the relativepositions of joints. Similarly, a left-wrist joint having a small changein position from image to image is less likely to belong to a subjecthaving the same joint at the same position from an image far apart intime, because the subjects are not expected to move at a very highspeed. These initial heuristics are used to build boundaries in time andspace for constellations of candidate joints that can be classified as aparticular subject. The joints in the joints data structures within aparticular time and space boundary are considered as “candidate joints”for assignment to sets of candidate joints as subjects present in thereal space. These candidate joints include joints identified in arraysof joints data structures from multiple images from a same camera over aperiod of time (time dimension) and across different cameras withoverlapping fields of view (space dimension).

Foot Joints

The joints can be divided for the purposes of a procedure for groupingthe joints into constellations, into foot and non-foot joints as shownabove in the list of joints. The left and right-ankle joint types in thecurrent example, are considered foot joints for the purpose of thisprocedure. The tracking engine 110 can start identification of sets ofcandidate joints of particular subjects using foot joints. In theembodiment of the shopping store, the feet of the customers are on thefloor 220 as shown in FIG. 2. The distance of the cameras 114 to thefloor 220 is known. Therefore, when combining the joints data structuresof foot joints from arrays of data joints data structures correspondingto images of cameras with overlapping fields of view, the trackingengine 110 can assume a known depth (distance along z axis). The valuedepth for foot joints is zero i.e. (x, y, 0) in the (x, y, z) coordinatesystem of the real space. Using this information, the image trackingengine 110 applies homographic mapping to combine joints data structuresof foot joints from cameras with overlapping fields of view to identifythe candidate foot joint. Using this mapping, the location of the jointin (x, y) coordinates in image space is converted to the location in the(x, y, z) coordinates in the real space, resulting in a candidate footjoint. This process is performed separately to identify candidate leftand right foot joints using respective joints data structures.

Following this, the tracking engine 110 can combine a candidate leftfoot joint and a candidate right foot joint (assigns them to a set ofcandidate joints) to create a subject. Other joints from the galaxy ofcandidate joints can be linked to the subject to build a constellationof some or all of the joint types for the created subject.

If there is only one left candidate foot joint and one right candidatefoot joint then it means there is only one subject in the particularspace at the particular time. The tracking engine 110 creates a newsubject having the left and the right candidate foot joints belonging toits set of joints. The subject is saved in the subject database 140. Ifthere are multiple candidate left and right foot joints, then the globalmetric calculator 702 attempts to combine each candidate left foot jointto each candidate right foot joint to create subjects such that thevalue of the global metric is minimized.

Non-Foot Joints

To identify candidate non-foot joints from arrays of joints datastructures within a particular time and space boundary, the trackingengine 110 uses the non-linear transformation (also referred to as afundamental matrix) from any given camera A to its neighboring camera Bwith overlapping fields of view. The non-linear transformations arecalculated using a single multi-joint subject and stored in thecalibration database 170 as described above. For example, for twocameras A and B with overlapping fields of view, the candidate non-footjoints are identified as follows. The non-foot joints in arrays ofjoints data structures corresponding to elements in image frames fromcamera A are mapped to epipolar lines in synchronized image frames fromcamera B. A joint (also referred to as a feature in machine visionliterature) identified by a joints data structure in an array of jointsdata structures of a particular image of camera A will appear on acorresponding epipolar line if it appears in the image of camera B. Forexample, if the joint in the joints data structure from camera A is aleft-wrist joint, then a left-wrist joint on the epipolar line in theimage of camera B represents the same left-wrist joint from theperspective of camera B. These two points in images of cameras A and Bare projections of the same point in the 3D scene in real space and arereferred to as a “conjugate pair”.

Machine vision techniques such as the technique by Longuet-Higginspublished in the paper, titled, “A computer algorithm for reconstructinga scene from two projections” in Nature, Volume 293, 10 Sep. 1981, areapplied to conjugate pairs of corresponding points to determine heightof joints from the floor 220 in the real space. Application of the abovemethod requires predetermined mapping between cameras with overlappingfields of view. That data is stored in the calibration database 170 asnon-linear functions determined during the calibration of the cameras114 described above.

The tracking engine 110 receives the arrays of joints data structurescorresponding to images in sequences of images from cameras havingoverlapping fields of view, and translates the coordinates of theelements in the arrays of joints data structures corresponding to imagesin different sequences into candidate non-foot joints having coordinatesin the real space. The identified candidate non-foot joints are groupedinto sets of subjects having coordinates in real space using the globalmetric calculator 702. The global metric calculator 702 calculates theglobal metric value and attempts to minimize the value by checkingdifferent combinations of non-foot joints. In one embodiment, the globalmetric is a sum of heuristics organized in four categories. The logic toidentify sets of candidate joints comprises heuristic functions based onphysical relationships among joints of subjects in real space toidentify sets of candidate joints as subjects. Examples of physicalrelationships among joints are considered in the heuristics as describedbelow.

First Category of Heuristics

The first category of heuristics includes metrics to ascertainsimilarity between two proposed subject-joint locations in the samecamera view at the same or different moments in time. In one embodiment,these metrics are floating point values, where higher values mean twolists of joints are likely to belong to the same subject. Consider theexample embodiment of the shopping store, the metrics determine thedistance between a customer's same joints in one camera from one imageto the next image along the time dimension. Given a customer A in thefield of view of the camera 412, the first set of metrics determines thedistance between each of person A's joints from one image from thecamera 412 to the next image from the camera 412. The metrics areapplied to joints data structures 600 in arrays of joints datastructures per image from cameras 114.

In one embodiment, two example metrics in the first category ofheuristics are listed below:

-   1. The inverse of the Euclidean 2D coordinate distance (using x, y    coordinate values for a particular image from a particular camera)    between the left ankle-joint of two subjects on the floor and the    right ankle-joint of the two subjects on the floor summed together.-   2. The sum of the inverse of Euclidean 2D coordinate distance    between every pair of non-foot joints of subjects in the image    frame.

Second Category of Heuristics

The second category of heuristics includes metrics to ascertainsimilarity between two proposed subject-joint locations from the fieldsof view of multiple cameras at the same moment in time. In oneembodiment, these metrics are floating point values, where higher valuesmean two lists of joints are likely to belong to the same subject.Consider the example embodiment of the shopping store, the second set ofmetrics determines the distance between a customer's same joints inimage frames from two or more cameras (with overlapping fields of view)at the same moment in time.

In one embodiment, two example metrics in the second category ofheuristics are listed below:

-   1. The inverse of the Euclidean 2D coordinate distance (using x, y    coordinate values for a particular image from a particular camera)    between the left ankle-joint of two subjects on the floor and the    right ankle-joint of the two subjects on the floor summed together.    The first subject's ankle-joint locations are projected to the    camera in which the second subject is visible through homographic    mapping.-   2. The sum of all pairs of joints of inverse of Euclidean 2D    coordinate distance between a line and a point, where the line is    the epipolar line of a joint of an image from a first camera having    a first subject in its field of view to a second camera with a    second subject in its field of view and the point is the joint of    the second subject in the image from the second camera.

Third Category of Heuristics

The third category of heuristics include metrics to ascertain similaritybetween all joints of a proposed subject-joint location in the samecamera view at the same moment in time. Consider the example embodimentof the shopping store, this category of metrics determines distancebetween joints of a customer in one frame from one camera.

Fourth Category of Heuristics

The fourth category of heuristics includes metrics to ascertaindissimilarity between proposed subject-joint locations. In oneembodiment, these metrics are floating point values. Higher values meantwo lists of joints are more likely to not be the same subject. In oneembodiment, two example metrics in this category include:

-   1. The distance between neck joints of two proposed subjects.-   2. The sum of the distance between pairs of joints between two    subjects.

In one embodiment, various thresholds which can be determinedempirically are applied to the above listed metrics as described below:

-   1. Thresholds to decide when metric values are small enough to    consider that a joint belongs to a known subject.-   2. Thresholds to determine when there are too many potential    candidate subjects that a joint can belong to with too good of a    metric similarity score.-   3. Thresholds to determine when collections of joints over time have    high enough metric similarity to be considered a new subject,    previously not present in the real space.-   4. Thresholds to determine when a subject is no longer in the real    space.-   5. Thresholds to determine when the tracking engine 110 has made a    mistake and has confused two subjects.

The tracking engine 110 includes logic to store the sets of jointsidentified as subjects. The logic to identify sets of candidate jointsincludes logic to determine whether a candidate joint identified inimages taken at a particular time corresponds with a member of one ofthe sets of candidate joints identified as subjects in preceding images.In one embodiment, the tracking engine 110 compares the currentjoint-locations of a subject with previously recorded joint-locations ofthe same subject at regular intervals. This comparison allows thetracking engine 110 to update the joint locations of subjects in thereal space. Additionally, using this, the tracking engine 110 identifiesfalse positives (i.e., falsely identified subjects) and removes subjectsno longer present in the real space.

Consider the example of the shopping store embodiment, in which thetracking engine 110 created a customer (subject) at an earlier moment intime, however, after some time, the tracking engine 110 does not havecurrent joint-locations for that particular customer. It means that thecustomer was incorrectly created. The tracking engine 110 deletesincorrectly generated subjects from the subject database 140. In oneembodiment, the tracking engine 110 also removes positively identifiedsubjects from the real space using the above described process. Considerthe example of the shopping store, when a customer leaves the shoppingstore, the tracking engine 110 deletes the corresponding customer recordfrom the subject database 140. In one such embodiment, the trackingengine 110 updates this customer's record in the subject database 140 toindicate that “customer has left the store”.

In one embodiment, the tracking engine 110 attempts to identify subjectsby applying the foot and non-foot heuristics simultaneously. Thisresults in “islands” of connected joints of the subjects. As thetracking engine 110 processes further arrays of joints data structuresalong the time and space dimensions, the size of the islands increases.Eventually, the islands of joints merge to other islands of jointsforming subjects which are then stored in the subject database 140. Inone embodiment, the tracking engine 110 maintains a record of unassignedjoints for a predetermined period of time. During this time, thetracking engine attempts to assign the unassigned joint to existingsubjects or create new multi-joint entities from these unassignedjoints. The tracking engine 110 discards the unassigned joints after apredetermined period of time. It is understood that, in otherembodiments, different heuristics than the ones listed above are used toidentify and track subjects.

In one embodiment, a user interface output device connected to the node102 hosting the tracking engine 110 displays position of each subject inthe real spaces. In one such embodiment, the display of the outputdevice is refreshed with new locations of the subjects at regularintervals.

Subject Data Structure

The joints of the subjects are connected to each other using the metricsdescribed above. In doing so, the tracking engine 110 creates newsubjects and updates the locations of existing subjects by updatingtheir respective joint locations. FIG. 8 shows the subject datastructure 800 to store the subject. The data structure 800 stores thesubject related data as a key-value dictionary. The key is aframe_number and value is another key-value dictionary where key is thecamera_id and value is a list of 18 joints (of the subject) with theirlocations in the real space. The subject data is stored in the subjectdatabase 140. Every new subject is also assigned a unique identifierthat is used to access the subject's data in the subject database 140.

In one embodiment, the system identifies joints of a subject and createsa skeleton of the subject. The skeleton is projected into the real spaceindicating the position and orientation of the subject in the realspace. This is also referred to as “pose estimation” in the field ofmachine vision. In one embodiment, the system displays orientations andpositions of subjects in the real space on a graphical user interface(GUI). In one embodiment, the image analysis is anonymous, i.e., aunique identifier assigned to a subject created through joints analysisdoes not identify personal identification details (such as names, emailaddresses, mailing addresses, credit card numbers, bank account numbers,driver's license number, etc.) of any specific subject in the realspace.

Process Flow of Subject Tracking

A number of flowcharts illustrating logic are described herein. Thelogic can be implemented using processors configured as described aboveprogrammed using computer programs stored in memory accessible andexecutable by the processors, and in other configurations, by dedicatedlogic hardware, including field programmable integrated circuits, and bycombinations of dedicated logic hardware and computer programs. With allflowcharts herein, it will be appreciated that many of the steps can becombined, performed in parallel, or performed in a different sequence,without affecting the functions achieved. In some cases, as the readerwill appreciate, a rearrangement of steps will achieve the same resultsonly if certain other changes are made as well. In other cases, as thereader will appreciate, a rearrangement of steps will achieve the sameresults only if certain conditions are satisfied. Furthermore, it willbe appreciated that the flow charts herein show only steps that arepertinent to an understanding of the embodiments, and it will beunderstood that numerous additional steps for accomplishing otherfunctions can be performed before, after and between those shown.

FIG. 9 is a flowchart illustrating process steps for tracking subjects.The process starts at step 902. The cameras 114 having field of view inan area of the real space are calibrated in process step 904. Videoprocesses are performed at step 906 by image recognition engines 112a-112 n. In one embodiment, the video process is performed per camera toprocess batches of image frames received from respective cameras. Theoutput of all video processes from respective image recognition engines112 a-112 n are given as input to a scene process performed by thetracking engine 110 at step 908. The scene process identifies newsubjects and updates the joint locations of existing subjects. At step910, it is checked if there are more image frames to be processed. Ifthere are more image frames, the process continues at step 906,otherwise the process ends at step 914.

More detailed process steps of the process step 904 “calibrate camerasin real space” are presented in a flowchart in FIG. 10. The calibrationprocess starts at step 1002 by identifying a (0, 0, 0) point for (x, y,z) coordinates of the real space. At step 1004, a first camera with thelocation (0, 0, 0) in its field of view is calibrated. More details ofcamera calibration are presented earlier in this application. At step1006, a next camera with overlapping field of view with the first camerais calibrated. At step 1008, it is checked whether there are morecameras to calibrate. The process is repeated at step 1006 until allcameras 114 are calibrated.

In a next process step 1010, a subject is introduced in the real spaceto identify conjugate pairs of corresponding points between cameras withoverlapping fields of view. Some details of this process are describedabove. The process is repeated for every pair of overlapping cameras atstep 1012. The process ends if there are no more cameras (step 1014).

A flowchart in FIG. 11 shows more detailed steps of the “video process”step 906. At step 1102, k-contiguously timestamped images per camera areselected as a batch for further processing. In one embodiment, the valueof k=6 which is calculated based on available memory for the videoprocess in the network nodes 101 a-101 n, respectively hosting imagerecognition engines 112 a-112 n. In a next step 1104, the size of imagesis set to appropriate dimensions. In one embodiment, the images have awidth of 1280 pixels, height of 720 pixels and three channels RGB(representing red, green and blue colors). At step 1106, a plurality oftrained convolutional neural networks (CNN) process the images andgenerate arrays of joints data structures per image. The output of theCNNs are arrays of joints data structures per image (step 1108). Thisoutput is sent to a scene process at step 1110.

FIG. 12A is a flowchart showing a first part of more detailed steps for“scene process” step 908 in FIG. 9. The scene process combines outputsfrom multiple video processes at step 1202. At step 1204, it is checkedwhether a joints data structure identifies a foot joint or a non-footjoint. If the joints data structure is of a foot-joint, homographicmapping is applied to combine the joints data structures correspondingto images from cameras with overlapping fields of view at step 1206.This process identifies candidate foot joints (left and right footjoints). At step 1208 heuristics are applied on candidate foot jointsidentified in step 1206 to identify sets of candidate foot joints assubjects. It is checked at step 1210 whether the set of candidate footjoints belongs to an existing subject. If not, a new subject is createdat step 1212. Otherwise, the existing subject is updated at step 1214.

A flowchart FIG. 12B illustrates a second part of more detailed stepsfor the “scene process” step 908. At step 1240, the data structures ofnon-foot joints are combined from multiple arrays of joints datastructures corresponding to images in the sequence of images fromcameras with overlapping fields of view. This is performed by mappingcorresponding points from a first image from a first camera to a secondimage from a second camera with overlapping fields of view. Some detailsof this process are described above. Heuristics are applied at step 1242to candidate non-foot joints. At step 1246 it is determined whether acandidate non-foot joint belongs to an existing subject. If so, theexisting subject is updated at step 1248. Otherwise, the candidatenon-foot joint is processed again at step 1250 after a predeterminedtime to match it with an existing subject. At step 1252 it is checkedwhether the non-foot joint belongs to an existing subject. If true, thesubject is updated at step 1256. Otherwise, the joint is discarded atstep 1254.

In an example embodiment, the processes to identify new subjects, tracksubjects and eliminate subjects (who have left the real space or wereincorrectly generated) are implemented as part of an “entity cohesionalgorithm” performed by the runtime system (also referred to as theinference system). An entity is a constellation of joints referred to assubject above. The entity cohesion algorithm identifies entities in thereal space and updates locations of the joints in real space to trackmovement of the entity.

FIG. 14 presents an illustration of video processes 1411 and sceneprocess 1415. In the illustrated embodiment, four video processes areshown, each processing images from one or more cameras 114. The videoprocesses, process images as described above and identify joints perframe. In one embodiment, each video process identifies the 2Dcoordinates, a confidence number, a joint number and a unique ID perjoint per frame. The outputs 1452 of all video processes are given asinput 1453 to the scene process 1415. In one embodiment, the sceneprocess creates a joint key-value dictionary per moment in time in whichthe key is the camera identifier and the value is the arrays of joints.The joints are re-projected into perspectives of cameras withoverlapping fields of view. The re-projected joints are stored as akey-value dictionary, and can be used to produce foreground subjectmasks for each image in each camera as discussed below. The key in thisdictionary is a combination of joint id and camera id. The values in thedictionary are 2D coordinates of the joint re-projected into the targetcamera's perspective.

The scene process 1415 produces an output 1457 comprising a list of allsubjects in the real space at a moment in time. The list includes akey-value dictionary per subject. The key is a unique identifier of asubject and the value is another key-value dictionary with the key asthe frame number and the value as the camera-subject joint key-valuedictionary. The camera-subject joint key-value dictionary is a persubject dictionary in which the key is the camera identifier and thevalue is a list of joints.

Image Analysis to Identify and Track Inventory Items Per Subject

A system and various implementations for tracking puts and takes ofinventory items by subjects in an area of real space are described withreference to FIGS. 15A to 25. The system and processes are describedwith reference to FIG. 15A, an architectural level schematic of a systemin accordance with an implementation. Because FIG. 15A is anarchitectural diagram, certain details are omitted to improve theclarity of the description.

Architecture of Multi-CNN Pipelines

FIG. 15A is a high-level architecture of pipelines of convolutionalneural networks (also referred to as multi-CNN pipelines) processingimage frames received from cameras 114 to generate shopping cart datastructures for each subject in the real space. The system described hereincludes per camera image recognition engines as described above foridentifying and tracking multi joint subjects. Alternative imagerecognition engines can be used, including examples in which only one“joint” is recognized and tracked per individual, or other features orother types of images data over space and time are utilized to recognizeand track subjects in the real space being processed.

The multi-CNN pipelines run in parallel per camera, moving images fromrespective cameras to image recognition engines 112 a-112 n via circularbuffers 1502 per camera. In one embodiment, the system is comprised ofthree subsystems: first image processors subsystem 2602, second imageprocessors subsystem 2604 and third image processors subsystem 2606. Inone embodiment, the first image processors subsystem 2602 includes imagerecognition engines 112 a-112 n implemented as convolutional neuralnetworks (CNNs) and referred to as joint CNNs 112 a-112 n. As describedin relation to FIG. 1, cameras 114 can be synchronized in time with eachother, so that images are captured at the same time, or close in time,and at the same image capture rate. Images captured in all the camerascovering an area of real space at the same time, or close in time, aresynchronized in the sense that the synchronized images can be identifiedin the processing engines as representing different views at a moment intime of subjects having fixed positions in the real space.

In one embodiment, the cameras 114 are installed in a shopping store(such as a supermarket) such that sets of cameras (two or more) withoverlapping fields of view are positioned over each aisle to captureimages of real space in the store. There are N cameras in the realspace, however, for simplification, only one camera is shown in FIG. 17Aas camera(i) where the value of i ranges from 1 to N. Each cameraproduces a sequence of images of real space corresponding to itsrespective field of view.

In one embodiment, the image frames corresponding to sequences of imagesfrom each camera are sent at the rate of 30 frames per second (fps) torespective image recognition engines 112 a-112 n. Each image frame has atimestamp, identity of the camera (abbreviated as “camera_id”), and aframe identity (abbreviated as “frame_id”) along with the image data.The image frames are stored in a circular buffer 1502 (also referred toas a ring buffer) per camera 114. Circular buffers 1502 store a set ofconsecutively timestamped image frames from respective cameras 114.

A joints CNN processes sequences of image frames per camera andidentifies 18 different types of joints of each subject present in itsrespective field of view. The outputs of joints CNNs 112 a-112 ncorresponding to cameras with overlapping fields of view are combined tomap the location of joints from 2D image coordinates of each camera to3D coordinates of real space. The joints data structures 800 per subject(j) where j equals 1 to x, identify locations of joints of a subject (j)in the real space. The details of subject data structure 800 arepresented in FIG. 8. In one example embodiment, the joints datastructure 800 is a two level key-value dictionary of joints of eachsubject. A first key is the frame_number and the value is a secondkey-value dictionary with the key as the camera_id and the value as thelist of joints assigned to a subject.

The data sets comprising subjects identified by joints data structures800 and corresponding image frames from sequences of image frames percamera are given as input to a bounding box generator 1504 in the thirdimage processors subsystem 2606. The third image processors subsystemfurther comprise foreground image recognition engines. In oneembodiment, the foreground image recognition engines recognizesemantically significant objects in the foreground (i.e. shoppers, theirhands and inventory items) as they relate to puts and takes of inventoryitems for example, over time in the images from each camera. In theexample implementation shown in FIG. 15A, the foreground imagerecognition engines are implemented as WhatCNN 1506 and WhenCNN 1508.The bounding box generator 1504 implements the logic to process the datasets to specify bounding boxes which include images of hands ofidentified subjects in images in the sequences of images. The boundingbox generator 1504 identifies locations of hand joints in each sourceimage frame per camera using locations of hand joints in themulti-joints data structures 800 corresponding to the respective sourceimage frame. In one embodiment, in which the coordinates of the jointsin subject data structure indicate location of joints in 3D real spacecoordinates, the bounding box generator maps the joint locations from 3Dreal space coordinates to 2D coordinates in the image frames ofrespective source images.

The bounding box generator 1504 creates bounding boxes for hand jointsin image frames in a circular buffer per camera 114. In one embodiment,the bounding box is a 128 pixels (width) by 128 pixels (height) portionof the image frame with the hand joint located in the center of thebounding box. In other embodiments, the size of the bounding box is 64pixels×64 pixels or 32 pixels×32 pixels. Form subjects in an image framefrom a camera, there can be a maximum of 2m hand joints, thus 2mbounding boxes. However, in practice fewer than 2m hands are visible inan image frame because of occlusions due to other subjects or otherobjects. In one example embodiment, the hand locations of subjects areinferred from locations of elbow and wrist joints. For example, theright hand location of a subject is extrapolated using the location ofthe right elbow (identified as p1) and the right wrist (identified asp2) as extrapolation_amount*(p2−p1)+p2 where extrapolation_amount equals0.4. In another embodiment, the joints CNN 112 a-112 n are trained usingleft and right hand images. Therefore, in such an embodiment, the jointsCNN 112 a-112 n directly identify locations of hand joints in imageframes per camera. The hand locations per image frame are used by thebounding box generator 1504 to create a bounding box per identified handjoint.

WhatCNN 1506 is a convolutional neural network trained to process thespecified bounding boxes in the images to generate a classification ofhands of the identified subjects. One trained WhatCNN 1506 processesimage frames from one camera. In the example embodiment of the shoppingstore, for each hand joint in each image frame, the WhatCNN 1506identifies whether the hand joint is empty. The WhatCNN 1506 alsoidentifies a SKU (stock keeping unit) number of the inventory item inthe hand joint, a confidence value indicating the item in the hand jointis a non-SKU item (i.e. it does not belong to the shopping storeinventory) and a context of the hand joint location in the image frame.

The outputs of WhatCNN models 1506 for all cameras 114 are processed bya single WhenCNN model 1508 for a pre-determined window of time. In theexample of a shopping store, the WhenCNN 1508 performs time seriesanalysis for both hands of subjects to identify whether a subject took astore inventory item from a shelf or put a store inventory item on ashelf. A shopping cart data structure 1510 (also referred to as a logdata structure including a list of inventory items) is created persubject to keep a record of the store inventory items in a shopping cart(or basket) associated with the subject.

The second image processors subsystem 2604 receives the same data setscomprising subjects identified by joints data structures 800 andcorresponding image frames from sequences of image frames per camera asgiven input to the third image processors. The subsystem 2604 includesbackground image recognition engines, recognizing semanticallysignificant differences in the background (i.e. inventory displaystructures like shelves) as they relate to puts and takes of inventoryitems for example, over time in the images from each camera. A selectionlogic component (not shown in FIG. 15A) uses a confidence score toselect output from either the second image processors or the third imageprocessors to generate the shopping cart data structure 1510.

FIG. 15B shows coordination logic module 1522 combining results ofmultiple WhatCNN models and giving it as input to a single WhenCNNmodel. As mentioned above, two or more cameras with overlapping fieldsof view capture images of subjects in real space. Joints of a singlesubject can appear in image frames of multiple cameras in respectiveimage channel 1520. A separate WhatCNN model identifies SKUs ofinventory items in hands (represented by hand joints) of subjects. Thecoordination logic module 1522 combines the outputs of WhatCNN modelsinto a single consolidated input for the WhenCNN model. The WhenCNNmodel 1508 operates on the consolidated input to generate the shoppingcart of the subject.

Detailed implementation of the system comprising multi-CNN pipelines ofFIG. 15A is presented in FIGS. 16, 17, and 18. In the example of theshopping store, the system tracks puts and takes of inventory items bysubjects in an area of real space. The area of real space is theshopping store with inventory items placed in shelves organized inaisles as shown in FIGS. 2 and 3. It is understood that shelvescontaining inventory items can be organized in a variety of differentarrangements. For example, shelves can be arranged in a line with theirback sides against a wall of the shopping store and the front sidefacing towards an open area in the real space. A plurality of cameras114 with overlapping fields of view in the real space produce sequencesof images of their corresponding fields of view. The field of view ofone camera overlaps with the field of view of at least one other cameraas shown in FIGS. 2 and 3.

Joints CNN—Identification and Update of Subjects

FIG. 16 is a flowchart of processing steps performed by joints CNN 112a-112 n to identify subjects in the real space. In the example of ashopping store, the subjects are customers moving in the store in aislesbetween shelves and other open spaces. The process starts at step 1602.Note that, as described above, the cameras are calibrated beforesequences of images from cameras are processed to identify subjects.Details of camera calibration are presented above. Cameras 114 withoverlapping fields of view capture images of real space in whichsubjects are present (step 1604). In one embodiment, the cameras areconfigured to generate synchronized sequences of images. The sequencesof images of each camera are stored in respective circular buffers 1502per camera. A circular buffer (also referred to as a ring buffer) storesthe sequences of images in a sliding window of time. In an embodiment, acircular buffer stores 110 image frames from a corresponding camera. Inanother embodiment, each circular buffer 1502 stores image frames for atime period of 3.5 seconds. It is understood, in other embodiments, thenumber of image frames (or the time period) can be greater than or lessthan the example values listed above.

Joints CNNs 112 a-112 n, receive sequences of image frames fromcorresponding cameras 114 (step 1606). Each joints CNN processes batchesof images from a corresponding camera through multiple convolutionnetwork layers to identify joints of subjects in image frames fromcorresponding camera. The architecture and processing of images by anexample convolutional neural network is presented FIG. 5. As cameras 114have overlapping fields of view, the joints of a subject are identifiedby more than one joints-CNN. The two dimensional (2D) coordinates ofjoints data structures 600 produced by joints-CNN are mapped to threedimensional (3D) coordinates of the real space to identify jointslocations in the real space. Details of this mapping are presented indiscussion of FIG. 7 in which the tracking engine 110 translates thecoordinates of the elements in the arrays of joints data structurescorresponding to images in different sequences of images into candidatejoints having coordinates in the real space.

The joints of a subject are organized in two categories (foot joints andnon-foot joints) for grouping the joints into constellations, asdiscussed above. The left and right-ankle joint type in the currentexample, are considered foot joints for the purpose of this procedure.At step 1608, heuristics are applied to assign a candidate left footjoint and a candidate right foot joint to a set of candidate joints tocreate a subject. Following this, at step 1610, it is determined whetherthe newly identified subject already exists in the real space. If not,then a new subject is created at step 1614, otherwise, the existingsubject is updated at step 1612.

Other joints from the galaxy of candidate joints can be linked to thesubject to build a constellation of some or all of the joint types forthe created subject. At step 1616, heuristics are applied to non-footjoints to assign those to the identified subjects. The global metriccalculator 702 calculates the global metric value and attempts tominimize the value by checking different combinations of non-footjoints. In one embodiment, the global metric is a sum of heuristicsorganized in four categories as described above.

The logic to identify sets of candidate joints comprises heuristicfunctions based on physical relationships among joints of subjects inreal space to identify sets of candidate joints as subjects. At step1618, the existing subjects are updated using the corresponding non-footjoints. If there are more images for processing (step 1620), steps 1606to 1618 are repeated, otherwise the process ends at step 1622. A firstdata sets are produced at the end of the process described above. Thefirst data sets identify subject and the locations of the identifiedsubjects in the real space. In one embodiment, the first data sets arepresented above in relation to FIG. 15A as joints data structures 800per subject.

WhatCNN—Classification of Hand Joints

FIG. 17 is a flowchart illustrating processing steps to identifyinventory items in hands of subjects identified in the real space. Inthe example of a shopping store, the subjects are customers in theshopping store. As the customers move in the aisles and opens spaces,they pick up inventory items stocked in the shelves and put the items intheir shopping cart or basket. The image recognition engines identifysubjects in the sets of images in the sequences of images received fromthe plurality of cameras. The system includes the logic to process setsof images in the sequences of images that include the identifiedsubjects to detect takes of inventory items by identified subjects andputs of inventory items on the shelves by identified subjects.

In one embodiment, the logic to process sets of images includes, for theidentified subjects, logic to process images to generate classificationsof the images of the identified subjects. The classifications includewhether the identified subject is holding an inventory item. Theclassifications include a first nearness classification indicating alocation of a hand of the identified subject relative to a shelf. Theclassifications include a second nearness classification indicating alocation a hand of the identified subject relative to a body of theidentified subject. The classifications further include a third nearnessclassification indicating a location a hand of the identified subjectrelative to a basket associated with an identified subject. Finally, theclassifications include an identifier of a likely inventory item.

In another embodiment, the logic to process sets of images includes, forthe identified subjects, logic to identify bounding boxes of datarepresenting hands in images in the sets of images of the identifiedsubjects. The data in the bounding boxes is processed to generateclassifications of data within the bounding boxes for the identifiedsubjects. In such an embodiment, the classifications include whether theidentified subject is holding an inventory item. The classificationsinclude a first nearness classification indicating a location of a handof the identified subject relative to a shelf. The classificationsinclude a second nearness classification indicating a location of a handof the identified subject relative to a body of the identified subject.The classifications include a third nearness classification indicating alocation of a hand of the identified subject relative to a basketassociated with an identified subject. Finally, the classificationsinclude an identifier of a likely inventory item.

The process starts at step 1702. At step 1704, locations of hands(represented by hand joints) of subjects in image frames are identified.The bounding box generator 1504 identifies hand locations of subjectsper frame from each camera using joint locations identified in the firstdata sets generated by joints CNNs 112 a-112 n as described in FIG. 18.Following this, at step 1706, the bounding box generator 1504 processesthe first data sets to specify bounding boxes which include images ofhands of identified multi joint subjects in images in the sequences ofimages. Details of bounding box generator are presented above indiscussion of FIG. 15A.

A second image recognition engine receives sequences of images from theplurality of cameras and processes the specified bounding boxes in theimages to generate a classification of hands of the identified subjects(step 1708). In one embodiment, each of the image recognition enginesused to classify the subjects based on images of hands comprises atrained convolutional neural network referred to as a WhatCNN 1506.WhatCNNs are arranged in multi-CNN pipelines as described above inrelation to FIG. 15A. In one embodiment, the input to a WhatCNN is amulti-dimensional array B×W×H×C (also referred to as a B×W×H×C tensor).“B” is the batch size indicating the number of image frames in a batchof images processed by the WhatCNN. “W” and “H” indicate the width andheight of the bounding boxes in pixels, “C” is the number of channels.In one embodiment, there are 30 images in a batch (B=30), so the size ofthe bounding boxes is 32 pixels (width) by 32 pixels (height). There canbe six channels representing red, green, blue, foreground mask, forearmmask and upperarm mask, respectively. The foreground mask, forearm maskand upperarm mask are additional and optional input data sources for theWhatCNN in this example, which the CNN can include in the processing toclassify information in the RGB image data. The foreground mask can begenerated using mixture of Gaussian algorithms, for example. The forearmmask can be a line between the wrist and elbow providing contextproduced using information in the Joints data structure. Likewise theupperarm mask can be a line between the elbow and shoulder producedusing information in the Joints data structure. Different values of B,W, H and C parameters can be used in other embodiments. For example, inanother embodiment, the size of the bounding boxes is larger e.g., 64pixels (width) by 64 pixels (height) or 128 pixels (width) by 128 pixels(height).

Each WhatCNN 1506 processes batches of images to generateclassifications of hands of the identified subjects. The classificationsinclude whether the identified subject is holding an inventory item. Theclassifications include one or more classifications indicating locationsof the hands relative to the shelf and relative to the subject, usableto detect puts and takes. In this example, a first nearnessclassification indicates a location of a hand of the identified subjectrelative to a shelf. The classifications include in this example asecond nearness classification indicating a location a hand of theidentified subject relative to a body of the identified subject, where asubject may hold an inventory item during shopping. The classificationsin this example further include a third nearness classificationindicating a location of a hand of the identified subject relative to abasket associated with an identified subject, where a “basket” in thiscontext is a bag, a basket, a cart or other object used by the subjectto hold the inventory items during shopping. Finally, theclassifications include an identifier of a likely inventory item. Thefinal layer of the WhatCNN 1506 produces logits which are raw values ofpredictions. The logits are represented as floating point values andfurther processed, as described below, for generating a classificationresult. In one embodiment, the outputs of the WhatCNN model, include amulti-dimensional array B×L (also referred to as a B×L tensor). “B” isthe batch size, and “L=N+5” is the number of logits output per imageframe. “N” is the number of SKUs representing “N” unique inventory itemsfor sale in the shopping store.

The output “L” per image frame is a raw activation from the WhatCNN1506. Logits “L” are processed at step 1710 to identify inventory itemand context. The first “N” logits represent confidence that the subjectis holding one of the “N” inventory items. Logits “L” include anadditional five (5) logits which are explained below. The first logitrepresents confidence that the image of the item in hand of the subjectis not one of the store SKU items (also referred to as non-SKU item).The second logit indicates a confidence whether the subject is holdingan item or not. A large positive value indicates that WhatCNN model hasa high level of confidence that the subject is holding an item. A largenegative value indicates that the model is confident that the subject isnot holding any item. A close to zero value of the second logitindicates that WhatCNN model is not confident in predicting whether thesubject is holding an item or not.

The next three logits represent first, second and third nearnessclassifications, including a first nearness classification indicating alocation of a hand of the identified subject relative to a shelf, asecond nearness classification indicating a location of a hand of theidentified subject relative to a body of the identified subject, and athird nearness classification indicating a location of a hand of theidentified subject relative to a basket associated with an identifiedsubject. Thus, the three logits represent context of the hand locationwith one logit each indicating confidence that the context of the handis near to a shelf, near to a basket (or a shopping cart), or near to abody of the subject. In one embodiment, the WhatCNN is trained using atraining dataset containing hand images in the three contexts: near to ashelf, near to a basket (or a shopping cart), and near to a body of asubject. In another embodiment, a “nearness” parameter is used by thesystem to classify the context of the hand. In such an embodiment, thesystem determines the distance of a hand of the identified subject tothe shelf, basket (or a shopping cart), and body of the subject toclassify the context.

The output of a WhatCNN is “L” logits comprised of N SKU logits, 1Non-SKU logit, 1 holding logit, and 3 context logits as described above.The SKU logits (first N logits) and the non-SKU logit (the first logitfollowing the N logits) are processed by a softmax function. Asdescribed above with reference to FIG. 5, the softmax functiontransforms a K-dimensional vector of arbitrary real values to aK-dimensional vector of real values in the range [0, 1] that add upto 1. A softmax function calculates the probabilities distribution ofthe item over N+1 items. The output values are between 0 and 1, and thesum of all the probabilities equals one. The softmax function (formulti-class classification) returns the probabilities of each class. Theclass that has the highest probability is the predicted class (alsoreferred to as target class).

The holding logit is processed by a sigmoid function. The sigmoidfunction takes a real number value as input and produces an output valuein the range of 0 to 1. The output of the sigmoid function identifieswhether the hand is empty or holding an item. The three context logitsare processed by a softmax function to identify the context of the handjoint location. At step 1712, it is checked if there are more images toprocess. If true, steps 1704-1710 are repeated, otherwise the processends at step 1714.

WhenCNN—Time Series Analysis to Identify Puts and Takes of Items

In one embodiment, the system implements logic to perform time sequenceanalysis over the classifications of subjects to detect takes and putsby the identified subjects based on foreground image processing of thesubjects. The time sequence analysis identifies gestures of the subjectsand inventory items associated with the gestures represented in thesequences of images.

The outputs of WhatCNNs 1506 in the multi-CNN pipelines are given asinput to the WhenCNN 1508 which processes these inputs to detect takesand puts by the identified subjects. Finally, the system includes logic,responsive to the detected takes and puts, to generate a log datastructure including a list of inventory items for each identifiedsubject. In the example of a shopping store, the log data structure isalso referred to as a shopping cart data structure 1510 per subject.

FIG. 18 presents a process implementing the logic to generate a shoppingcart data structure per subject. The process starts at step 1802. Theinput to WhenCNN 1508 is prepared at step 1804. The input to the WhenCNNis a multi-dimensional array B×C×T×Cams, where B is the batch size, C isthe number of channels, T is the number of frames considered for awindow of time, and Cams is the number of cameras 114. In oneembodiment, the batch size “B” is 64 and the value of “T” is 110 imageframes or the number of image frames in 3.5 seconds of time.

For each subject identified per image frame, per camera, a list of 10logits per hand joint (20 logits for both hands) is produced. Theholding and context logits are part of the “L” logits generated byWhatCNN 1506 as described above.

[ holding, # 1 logit context, # 3 logits slice_dot(sku, log_sku), # 1logit slice_dot(sku, log_other_sku), # 1 logit slice_dot(sku,roll(log_sku, −30)), # 1 logit slice_dot(sku, roll(log_sku, 30)), # 1logit slice_dot(sku, roll(log_other_sku, −30)), # 1 logit slice_dot(sku,roll(log_other_sku, 30)) # 1 logit ]

The above data structure is generated for each hand in an image frameand also includes data about the other hand of the same subject. Forexample, if data is for the left hand joint of a subject, correspondingvalues for the right hand are included as “other” logits. The fifthlogit (item number 3 in the list above referred to as log_sku) is thelog of SKU logit in “L” logits described above. The sixth logit is thelog of SKU logit for other hand. A “roll” function generates the sameinformation before and after the current frame. For example, the seventhlogit (referred to as roll(log_sku, −30)) is the log of the SKU logit,30 frames earlier than the current frame. The eighth logit is the log ofthe SKU logits for the hand, 30 frames later than the current frame. Theninth and tenth data values in the list are similar data for the otherhand 30 frames earlier and 30 frames later than the current frame. Asimilar data structure for the other hand is also generated, resultingin a total of 20 logits per subject per image frame per camera.Therefore, the number of channels in the input to the WhenCNN is 20(i.e. C=20 in the multi-dimensional array B×C×T×Cams).

For all image frames in the batch of image frames (e.g., B=64) from eachcamera, similar data structures of 20 hand logits per subject,identified in the image frame, are generated. A window of time (T=3.5seconds or 110 image frames) is used to search forward and backwardimage frames in the sequence of image frames for the hand joints ofsubjects. At step 1806, the 20 hand logits per subject per frame areconsolidated from multi-CNN pipelines. In one embodiment, the batch ofimage frames (64) can be imagined as a smaller window of image framesplaced in the middle of a larger window of image frame 110 withadditional image frames for forward and backward search on both sides.The input B×C×T×Cams to WhenCNN 1508 is composed of 20 logits for bothhands of subjects identified in batch “B” of image frames from allcameras 114 (referred to as “Cams”). The consolidated input is given toa single trained convolutional neural network referred to as WhenCNNmodel 1508.

The output of the WhenCNN model comprises of 3 logits, representingconfidence in three possible actions of an identified subject: taking aninventory item from a shelf, putting an inventory item back on theshelf, and no action. The three output logits are processed by a softmaxfunction to predict an action performed. The three classification logitsare generated at regular intervals for each subject and results arestored per person along with a time stamp. In one embodiment, the threelogits are generated every twenty frames per subject. In such anembodiment, at an interval of every 20 image frames per camera, a windowof 110 image frames is formed around the current image frame.

A time series analysis of these three logits per subject over a periodof time is performed (step 1808) to identify gestures corresponding totrue events and their time of occurrence. A non-maximum suppression(NMS) algorithm is used for this purpose. As one event (i.e. put or takeof an item by a subject) is detected by WhenCNN 1508 multiple times(both from the same camera and from multiple cameras), the NMS removessuperfluous events for a subject. NMS is a rescoring techniquecomprising two main tasks: “matching loss” that penalizes superfluousdetections and “joint processing” of neighbors to know if there is abetter detection close-by.

The true events of takes and puts for each subject are further processedby calculating an average of the SKU logits for 30 image frames prior tothe image frame with the true event. Finally, the arguments of themaxima (abbreviated arg max or argmax) is used to determine the largestvalue. The inventory item classified by the argmax value is used toidentify the inventory item put or take from the shelf. The inventoryitem is added to a log of SKUs (also referred to as shopping cart orbasket) of respective subjects in step 1810. The process steps 1804 to1810 are repeated, if there is more classification data (checked at step1812). Over a period of time, this processing results in updates to theshopping cart or basket of each subject. The process ends at step 1814.

WhatCNN with Scene and Video Processes

FIG. 19 presents an embodiment of the system in which data from sceneprocess 1415 and video processes 1411 is given as input to WhatCNN model1506 to generate hand image classifications. Note that the output ofeach video process is given to a separate WhatCNN model. The output fromthe scene process 1415 is a joints dictionary. In this dictionary, keysare unique joint identifiers and values are unique subject identifierswith which the joint is associated. If no subject is associated with ajoint, then it is not included in the dictionary. Each video process1411 receives a joints dictionary from the scene process and stores itinto a ring buffer that maps frame numbers to the returned dictionary.Using the returned key-value dictionary, the video processes selectsubsets of the image at each moment in time that are near handsassociated with identified subjects. These portions of image framesaround hand joints can be referred to as region proposals.

In the example of a shopping store, a region proposal is the frame imageof hand location from one or more cameras with the subject in theircorresponding fields of view. A region proposal is generated by everycamera in the system. It includes empty hands as well as hands carryingshopping store inventory items and items not belonging to shopping storeinventory. Video processes select portions of image frames containinghand joint per moment in time. Similar slices of foreground masks aregenerated. The above (image portions of hand joints and foregroundmasks) are concatenated with the joints dictionary (indicating subjectsto whom respective hand joints belong) to produce a multi-dimensionalarray. This output from video processes is given as input to the WhatCNNmodel.

The classification results of the WhatCNN model are stored in the regionproposal data structures (produced by video processes). All regions fora moment in time are then given back as input to the scene process. Thescene process stores the results in a key-value dictionary, where thekey is a subject identifier and the value is a key-value dictionary,where the key is a camera identifier and the value is a region's logits.This aggregated data structure is then stored in a ring buffer that mapsframe numbers to the aggregated structure for each moment in time.

WhenCNN with Scene and Video Processes

FIG. 20 presents an embodiment of the system in which the WhenCNN 1508receives output from a scene process following the hand imageclassifications performed by the WhatCNN models per video process asexplained in FIG. 19. Region proposal data structures for a period oftime e.g., for one second, are given as input to the scene process. Inone embodiment, in which cameras are taking images at the rate of 30frames per second, the input includes 30 time periods and correspondingregion proposals. The scene process reduces 30 region proposals (perhand) to a single integer representing the inventory item SKU. Theoutput of the scene process is a key-value dictionary in which the keyis a subject identifier and the value is the SKU integer.

The WhenCNN model 1508 performs a time series analysis to determine theevolution of this dictionary over time. This results in identificationof items taken from shelves and put on shelves in the shopping store.The output of the WhenCNN model is a key-value dictionary in which thekey is the subject identifier and the value is logits produced by theWhenCNN. In one embodiment, a set of heuristics 2002 is used todetermine the shopping cart data structure 1510 per subject. Theheuristics are applied to the output of the WhenCNN, joint locations ofsubjects indicated by their respective joints data structures, andplanograms. The planograms are precomputed maps of inventory items onshelves. The heuristics 2002 determine, for each take or put, whetherthe inventory item is put on a shelf or taken from a shelf, whether theinventory item is put in a shopping cart (or a basket) or taken from theshopping cart (or the basket) or whether the inventory item is close tothe identified subject's body.

Example Architecture of What-CNN Model

FIG. 21 presents an example architecture of WhatCNN model 1506. In thisexample architecture, there are a total of 26 convolutional layers. Thedimensionality of different layers in terms of their respective width(in pixels), height (in pixels) and number of channels is alsopresented. The first convolutional layer 2113 receives input 2111 andhas a width of 64 pixels, height of 64 pixels and has 64 channels(written as 64×64×64). The details of input to the WhatCNN are presentedabove. The direction of arrows indicates flow of data from one layer tothe following layer. The second convolutional layer 2115 has adimensionality of 32×32×64. Followed by the second layer, there areeight convolutional layers (shown in box 2117) each with adimensionality of 32×32×64. Only two layers 2119 and 2121 are shown inthe box 2117 for illustration purposes. This is followed by anothereight convolutional layers 2123 of 16×16×128 dimensions. Two suchconvolutional layers 2125 and 2127 are shown in FIG. 21. Finally, thelast eight convolutional layers 2129, have a dimensionality of 8×8×256each. Two convolutional layers 2131 and 2133 are shown in the box 2129for illustration.

There is one fully connected layer 2135 with 256 inputs from the lastconvolutional layer 2133 producing N+5 outputs. As described above, “N”is the number of SKUs representing “N” unique inventory items for salein the shopping store. The five additional logits include the firstlogit representing confidence that item in the image is a non-SKU item,and the second logit representing confidence whether the subject isholding an item. The next three logits represent first, second and thirdnearness classifications, as described above. The final output of theWhatCNN is shown at 2137. The example architecture uses batchnormalization (BN). Distribution of each layer in a convolutional neuralnetwork (CNN) changes during training and it varies from one layer toanother. This reduces convergence speed of the optimization algorithm.Batch normalization (Ioffe and Szegedy 2015) is a technique to overcomethis problem. ReLU (Rectified Linear Unit) activation is used for eachlayer's non-linearity except for the final output where softmax is used.

FIGS. 22, 23, and 24 are graphical visualizations of different parts ofan implementation of WhatCNN 1506. The figures are adapted fromgraphical visualizations of a WhatCNN model generated by TensorBoard™.TensorBoard™ is a suite of visualization tools for inspecting andunderstanding deep learning models e.g., convolutional neural networks.

FIG. 22 shows a high level architecture of the convolutional neuralnetwork model that detects a single hand (“single hand” model 2210).WhatCNN model 1506 comprises two such convolutional neural networks fordetecting left and right hands, respectively. In the illustratedembodiment, the architecture includes four blocks referred to as block02216, block1 2218, block2 2220, and block3 2222. A block is ahigher-level abstraction and comprises multiple nodes representingconvolutional layers. The blocks are arranged in a sequence from lowerto higher such that output from one block is input to a successiveblock. The architecture also includes a pooling layer 2214 and aconvolution layer 2212. In between the blocks, different non-linearitiescan be used. In the illustrated embodiment, a ReLU non-linearity is usedas described above.

In the illustrated embodiment, the input to the single hand model 2210is a B×W×H×C tensor defined above in description of WhatCNN 1506. “B” isthe batch size, “W” and “H” indicate the width and height of the inputimage, and “C” is the number of channels. The output of the single handmodel 2210 is combined with a second single hand model and passed to afully connected network.

During training, the output of the single hand model 2210 is comparedwith ground truth. A prediction error calculated between the output andthe ground truth is used to update the weights of convolutional layers.In the illustrated embodiment, stochastic gradient descent (SGD) is usedfor training WhatCNN 1506.

FIG. 23 presents further details of the block0 2216 of the single handconvolutional neural network model of FIG. 22. It comprises fourconvolutional layers labeled as conv0 in box 2310, conv1 2318, conv22320, and conv3 2322. Further details of the convolutional layer conv0are presented in the box 2310. The input is processed by a convolutionallayer 2312. The output of the convolutional layer is processed by abatch normalization layer 2314. ReLU non-linearity 2316 is applied tothe output of the batch normalization layer 2314. The output of theconvolutional layer conv0 is passed to the next layer conv1 2318. Theoutput of the final convolutional layer conv3 is processed through anaddition operation 2324. This operation sums the output from the layerconv3 2322 to unmodified input coming through a skip connection 2326. Ithas been shown by He et al. in their paper titled, “Identity mappings indeep residual networks” (published athttps://arxiv.org/pdf/1603.05027.pdf on Jul. 25, 2016) that forward andbackward signals can be directly propagated from one block to any otherblock. The signal propagates unchanged through the convolutional neuralnetwork. This technique improves training and test performance of deepconvolutional neural networks.

As described in FIG. 21, the output of convolutional layers of a WhatCNNis processed by a fully connected layer. The outputs of two single handmodels 2210 are combined and passed as input to a fully connected layer.FIG. 24 is an example implementation of a fully connected layer (FC)2410. The input to the FC layer is processed by a reshape operator 2412.The reshape operator changes the shape of the tensor before passing itto a next layer 2420. Reshaping includes flattening the output from theconvolutional layers i.e., reshaping the output from a multi-dimensionalmatrix to a one-dimensional matrix or a vector. The output of thereshape operator 2412 is passed to a matrix multiplication operatorlabelled as MatMul 2422. The output from the MatMul 2422 is passed to amatrix plus addition operator labelled as xw_plus_b 2424. For each input“x”, the operator 2424 multiplies the input by a matrix “w” and a vector“b” to produce the output. “w” is a trainable parameter associated withthe input “x” and “b” is another trainable parameter which is calledbias or intercept. The output 2426 from the fully connecter layer 2410is a B×L tensor as explained above in the description of WhatCNN 1506.“B” is the batch size, and “L=N+5” is the number of logits output perimage frame. “N” is the number of SKUs representing “N” unique inventoryitems for sale in the shopping store.

Training of WhatCNN Model

A training data set of images of hands holding different inventory itemsin different contexts, as well as empty hands in different contexts iscreated. To achieve this, human actors hold each unique SKU inventoryitem in multiple different ways, at different locations of a testenvironment. The context of their hands range from being close to theactor's body, being close to the store's shelf, and being close to theactor's shopping cart or basket. The actor performs the above actionswith an empty hand as well. This procedure is completed for both leftand right hands. Multiple actors perform these actions simultaneously inthe same test environment to simulate the natural occlusion that occursin real shopping stores.

Cameras 114 takes images of actors performing the above actions. In oneembodiment, twenty cameras are used in this process. The joints CNNs 112a-112 n and the tracking engine 110 process the images to identifyjoints. The bounding box generator 1504 creates bounding boxes of handregions similar to production or inference. Instead of classifying thesehand regions via the WhatCNN 1506, the images are saved to a storagedisk. Stored images are reviewed and labelled. An image is assignedthree labels: the inventory item SKU, the context, and whether the handis holding something or not. This process is performed for a largenumber of images (up to millions of images).

The image files are organized according to data collection scenes. Thenaming convention for image file identifies content and context of theimages. FIG. 25 shows an image file name in an example embodiment. Afirst part of the file name, referred to by a numeral 2502, identifiesthe data collection scene and also includes the timestamp of the image.A second part 2504 of the file name identifies the source camera. In theexample shown in FIG. 25, the image is captured by “camera 4”. A thirdpart 2506 of the file name identifies the frame number from the sourcecamera. In the illustrated example, the file name indicates it is the94,600^(th) image frame from camera 4. A fourth part 2508 of the filename identifies ranges of x and y coordinates region in the source imageframe from which this hand region image is taken. In the illustratedexample, the region is defined between x coordinate values from pixel117 to 370 and y coordinates values from pixels 370 and 498. A fifthpart 2510 of the file name identifies the person id of the actor in thescene. In the illustrated example, the person in the scene has an id“3”. Finally, a sixth part 2512 of the file name identifies the SKUnumber (item=68) of the inventory item, identified in the image.

In training mode of the WhatCNN 1506, forward passes andbackpropagations are performed as opposed to production mode in whichonly forward passes are performed. During training, the WhatCNNgenerates a classification of hands of the identified subjects in aforward pass. The output of the WhatCNN is compared with the groundtruth. In the backpropagation, a gradient for one or more cost functionsis calculated. The gradient(s) are then propagated to the convolutionalneural network (CNN) and the fully connected (FC) neural network so thatthe prediction error is reduced causing the output to be closer to theground truth. In one embodiment, stochastic gradient descent (SGD) isused for training WhatCNN 1506.

In one embodiment, 64 images are randomly selected from the trainingdata and augmented. The purpose of image augmentation is to diversifythe training data resulting in better performance of models. The imageaugmentation includes random flipping of the image, random rotation,random hue shifts, random Gaussian noise, random contrast changes, andrandom cropping. The amount of augmentation is a hyperparameter and istuned through hyperparameter search. The augmented images are classifiedby WhatCNN 1506 during training. The classification is compared withground truth and coefficients or weights of WhatCNN 1506 are updated bycalculating gradient loss function and multiplying the gradient with alearning rate. The above process is repeated many times (e.g.,approximately 1000 times) to form an epoch. Between 50 to 200 epochs areperformed. During each epoch, the learning rate is slightly decreasedfollowing a cosine annealing schedule.

Training of WhenCNN Model

Training of WhenCNN 1508 is similar to the training of WhatCNN 1506described above, using backpropagations to reduce prediction error.Actors perform a variety of actions in the training environment. In theexample embodiment, the training is performed in a shopping store withshelves stocked with inventory items. Examples of actions performed byactors include, take an inventory item from a shelf, put an inventoryitem back on a shelf, put an inventory item into a shopping cart (or abasket), take an inventory item back from the shopping cart, swap anitem between left and right hands, put an inventory item into theactor's nook. A nook refers to a location on the actor's body that canhold an inventory item besides the left and right hands. Some examplesof nook include, an inventory item squeezed between a forearm and upperarm, squeezed between a forearm and a chest, squeezed between neck and ashoulder.

The cameras 114 record videos of all actions described above duringtraining. The videos are reviewed and all image frames are labelledindicating the timestamp and the action performed. These labels arereferred to as action labels for respective image frames. The imageframes are processed through the multi-CNN pipelines up to the WhatCNNs1506 as described above for production or inference. The output ofWhatCNNs along with the associated action labels are then used to trainthe WhenCNN 1508, with the action labels acting as ground truth.Stochastic gradient descent (SGD) with a cosine annealing schedule isused for training as described above for training of WhatCNN 1506.

In addition to image augmentation (used in training of WhatCNN),temporal augmentation is also applied to image frames during training ofthe WhenCNN. Some examples include mirroring, adding Gaussian noise,swapping the logits associated with left and right hands, shortening thetime, shortening the time series by dropping image frames, lengtheningthe time series by duplicating frames, and dropping the data points inthe time series to simulate spottiness in the underlying modelgenerating input for the WhenCNN. Mirroring includes reversing the timeseries and respective labels, for example a put action becomes a takeaction when reversed.

Predicting Inventory Events Using Background Image Processing

A system and various implementations for tracking changes by subjects inan area of real space are described with reference to FIGS. 26 to 28-B.

System Architecture

FIG. 26 presents a high level schematic of a system in accordance withan implementation. Because FIG. 26 is an architectural diagram, certaindetails are omitted to improve the clarity of description.

The system presented in FIG. 26 receives image frames from a pluralityof cameras 114. As described above, in one embodiment, the cameras 114can be synchronized in time with each other, so that images are capturedat the same time, or close in time, and at the same image capture rate.Images captured in all the cameras covering an area of real space at thesame time, or close in time, are synchronized in the sense that thesynchronized images can be identified in the processing engines asrepresenting different views at a moment in time of subjects havingfixed positions in the real space.

In one embodiment, the cameras 114 are installed in a shopping store(such as a supermarket) such that sets of cameras (two or more) withoverlapping fields of view are positioned over each aisle to captureimages of real space in the store. There are “n” cameras in the realspace. Each camera produces a sequence of images of real spacecorresponding to its respective field of view.

A subject identification subsystem 2602 (also referred to as first imageprocessors) processes image frames received from cameras 114 to identifyand track subjects in the real space. The first image processors includesubject image recognition engines. The subject image recognition enginesreceive corresponding sequences of images from the plurality of cameras,and process images to identify subjects represented in the images in thecorresponding sequences of images. In one embodiment, the systemincludes per camera image recognition engines as described above foridentifying and tracking multi joint subjects. Alternative imagerecognition engines can be used, including examples in which only one“joint” is recognized and tracked per individual, or other features orother types of images data over space and time are utilized to recognizeand track subjects in the real space being processed.

A “semantic diffing” subsystem 2604 (also referred to as second imageprocessors) includes background image recognition engines, receivingcorresponding sequences of images from the plurality of cameras andrecognize semantically significant differences in the background (i.e.inventory display structures like shelves) as they relate to puts andtakes of inventory items for example, over time in the images from eachcamera. The second image processors receive output of the subjectidentification subsystem 2602 and image frames from cameras 114 asinput. The second image processors mask the identified subjects in theforeground to generate masked images. The masked images are generated byreplacing bounding boxes that correspond with foreground subjects withbackground image data. Following this, the background image recognitionengines process the masked images to identify and classify backgroundchanges represented in the images in the corresponding sequences ofimages. In one embodiment, the background image recognition enginescomprise convolutional neural networks.

Finally, the second image processors process identified backgroundchanges to make a first set of detections of takes of inventory items byidentified subjects and of puts of inventory items on inventory displaystructures by identified subjects. The first set of detections are alsoreferred to as background detections of puts and takes of inventoryitems. In the example of a shopping store, the first detections identifyinventory items taken from the shelves or put on the shelves bycustomers or employees of the store. The semantic diffing subsystemincludes the logic to associate identified background changes withidentified subjects.

A region proposals subsystem 2606 (also referred to as third imageprocessors) include foreground image recognition engines, receivingcorresponding sequences of images from the plurality of cameras 114, andrecognize semantically significant objects in the foreground (i.e.shoppers, their hands and inventory items) as they relate to puts andtakes of inventory items for example, over time in the images from eachcamera. The subsystem 2606 also receives output of the subjectidentification subsystem 2602. The third image processors processsequences of images from cameras 114 to identify and classify foregroundchanges represented in the images in the corresponding sequences ofimages. The third image processors process identified foreground changesto make a second set of detections of takes of inventory items byidentified subjects and of puts of inventory items on inventory displaystructures by identified subjects. The second set of detections are alsoreferred to as foreground detection of puts and takes of inventoryitems. In the example of a shopping store, the second set of detectionsidentify takes of inventory items and puts of inventory items oninventory display structures by customers and employees of the store.

The system described in FIG. 26 includes a selection logic component2608 to process the first and second sets of detections to generate logdata structures including lists of inventory items for identifiedsubjects. For a take or put in the real space, the selection logic 2608selects the output from either the semantic diffing subsystem 2604 orthe region proposals subsystem 2606. In one embodiment, the selectionlogic 2608 uses a confidence score generated by the semantic diffingsubsystem for the first set of detections and a confidence scoregenerated by the region proposals subsystem for a second set ofdetections to make the selection. The output of the subsystem with ahigher confidence score for a particular detection is selected and usedto generate a log data structure 1510 (also referred to as a shoppingcart data structure) including a list of inventory items associated withidentified foreground subjects.

Subsystem Components

FIG. 27 presents subsystem components implementing the system fortracking changes by subjects in an area of real space. The systemcomprises of the plurality of cameras 114 producing respective sequencesof images of corresponding fields of view in the real space. The fieldof view of each camera overlaps with the field of view of at least oneother camera in the plurality of cameras as described above. In oneembodiment, the sequences of image frames corresponding to the imagesproduced by the plurality of cameras 114 are stored in a circular buffer1502 (also referred to as a ring buffer) per camera 114. Each imageframe has a timestamp, identity of the camera (abbreviated as“camera_id”), and a frame identity (abbreviated as “frame_id”) alongwith the image data. Circular buffers 1502 store a set of consecutivelytimestamped image frames from respective cameras 114. In one embodiment,the cameras 114 are configured to generate synchronized sequences ofimages.

The same cameras and the same sequences of images are used by both theforeground and background image processors in one preferredimplementation. As a result, redundant detections of puts and takes ofinventory items are made using the same input data allowing for highconfidence, and high accuracy, in the resulting data.

The subject identification subsystem 2602 (also referred to as the firstimage processors), includes subject image recognition engines, receivingcorresponding sequences of images from the plurality of cameras 114. Thesubject image recognition engines process images to identify subjectsrepresented in the images in the corresponding sequences of images. Inone embodiment, the subject image recognition engines are implemented asconvolutional neural networks (CNNs) referred to as joints CNN 112 a-112n. The outputs of joints CNNs 112 a-112 n corresponding to cameras withoverlapping fields of view are combined to map the location of jointsfrom 2D image coordinates of each camera to 3D coordinates of realspace. The joints data structures 800 per subject (j) where j equals 1to x, identify locations of joints of a subject (j) in the real spaceand in 2D space for each image. Some details of subject data structure800 are presented in FIG. 8.

A background image store 2704, in the semantic diffing subsystem 2604,stores masked images (also referred to as background images in whichforeground subjects have been removed by masking) for correspondingsequences of images from cameras 114. The background image store 2704 isalso referred to as a background buffer. In one embodiment, the size ofthe masked images is the same as the size of image frames in thecircular buffer 1502. In one embodiment, a masked image is stored in thebackground image store 2704 corresponding to each image frame in thesequences of image frames per camera.

The semantic diffing subsystem 2604 (or the second image processors)includes a mask generator 2724 producing masks of foreground subjectsrepresented in the images in the corresponding sequences of images froma camera. In one embodiment, one mask generator processes sequences ofimages per camera. In the example of the shopping store, the foregroundsubjects are customers or employees of the store in front of thebackground shelves containing items for sale.

In one embodiment, the joint data structures 800 and image frames fromthe circular buffer 1502 are given as input to the mask generator 2724.The joint data structures identify locations of foreground subjects ineach image frame. The mask generator 2724 generates a bounding box perforeground subject identified in the image frame. In such an embodiment,the mask generator 2724 uses the values of the x and y coordinates ofjoint locations in 2D image frame to determine the four boundaries ofthe bounding box. A minimum value of x (from all x values of joints fora subject) defines the left vertical boundary of the bounding box forthe subject. A minimum value of y (from all y values of joints for asubject) defines the bottom horizontal boundary of the bounding box.Likewise, the maximum values of x and y coordinates identify the rightvertical and top horizontal boundaries of the bounding box. In a secondembodiment, the mask generator 2724 produces bounding boxes forforeground subjects using a convolutional neural network-based persondetection and localization algorithm. In such an embodiment, the maskgenerator 2724 does not use the joint data structures 800 to generatebounding boxes for foreground subjects.

The semantic diffing subsystem 2604 (or the second image processors)include a mask logic to process images in the sequences of images toreplace foreground image data representing the identified subjects withbackground image data from the background images for the correspondingsequences of images to provide the masked images, resulting in a newbackground image for processing. As the circular buffer receives imageframes from cameras 114, the mask logic processes images in thesequences of images to replace foreground image data defined by theimage masks with background image data. The background image data istaken from the background images for the corresponding sequences ofimages to generate the corresponding masked images.

Consider, the example of the shopping store. Initially at time t=0, whenthere are no customers in the store, a background image in thebackground image store 2704 is the same as its corresponding image framein the sequences of images per camera. Now consider at time t=1, acustomer moves in front of a shelf to buy an item in the shelf. The maskgenerator 2724 creates a bounding box of the customer and sends it to amask logic component 2702. The mask logic component 2702 replaces thepixels in the image frame at t=1 inside the bounding box bycorresponding pixels in the background image frame at t=0. This resultsin a masked image at t=1 corresponding to the image frame at t=1 in thecircular buffer 1502. The masked image does not include pixels forforeground subject (or customer) which are now replaced by pixels fromthe background image frame at t=0. The masked image at t=1 is stored inthe background image store 2704 and acts as a background image for thenext image frame at t=2 in the sequence of images from the correspondingcamera.

In one embodiment, the mask logic component 2702 combines, such as byaveraging or summing by pixel, sets of N masked images in the sequencesof images to generate sequences of factored images for each camera. Insuch an embodiment, the second image processors identify and classifybackground changes by processing the sequence of factored images. Afactored image can be generated, for example, by taking an average valuefor pixels in the N masked images in the sequence of masked images percamera. In one embodiment, the value of N is equal to the frame rate ofcameras 114, for example if the frame rate is 30 FPS (frames persecond), the value of N is 30. In such an embodiment, the masked imagesfor a time period of one second are combined to generate a factoredimage. Taking the average pixel values minimizes the pixel fluctuationsdue to sensor noise and luminosity changes in the area of real space.

The second image processors identify and classify background changes byprocessing the sequence of factored images. A factored image in thesequences of factored images is compared with the preceding factoredimage for the same camera by a bit mask calculator 2710. Pairs offactored images 2706 are given as input to the bit mask calculator 2710to generate a bit mask identifying changes in corresponding pixels ofthe two factored images. The bit mask has 1 s at the pixel locationswhere the difference between the corresponding pixels' (current andprevious factored image) RGB (red, green and blue channels) values isgreater than a “difference threshold”. The value of the differencethreshold is adjustable. In one embodiment, the value of the differencethreshold is set at 0.1.

The bit mask and the pair of factored images (current and previous) fromsequences of factored images per camera are given as input to backgroundimage recognition engines. In one embodiment, the background imagerecognition engines comprise convolutional neural networks and arereferred to as ChangeCNN 2714 a-2714 n. A single ChangeCNN processessequences of factored images per camera. In another embodiment, themasked images from corresponding sequences of images are not combined.The bit mask is calculated from the pairs of masked images. In thisembodiment, the pairs of masked images and the bit mask is then given asinput to the ChangeCNN.

The input to a ChangeCNN model in this example consists of seven (7)channels including three image channels (red, green and blue) perfactored image and one channel for the bit mask. The ChangeCNN comprisesof multiple convolutional layers and one or more fully connected (FC)layers. In one embodiment, the ChangeCNN comprises of the same number ofconvolutional and FC layers as the JointsCNN 112 a-112 n as illustratedin FIG. 5.

The background image recognition engines (ChangeCNN 2714 a-2714 n)identify and classify changes in the factored images and produce changedata structures for the corresponding sequences of images. The changedata structures include coordinates in the masked images of identifiedbackground changes, identifiers of an inventory item subject of theidentified background changes and classifications of the identifiedbackground changes. The classifications of the identified backgroundchanges in the change data structures classify whether the identifiedinventory item has been added or removed relative to the backgroundimage.

As multiple items can be taken or put on the shelf simultaneously by oneor more subjects, the ChangeCNN generates a number “B” overlappingbounding box predictions per output location. A bounding box predictioncorresponds to a change in the factored image. Consider the shoppingstore has a number “C” unique inventory items, each identified by aunique SKU. The ChangeCNN predicts the SKU of the inventory item subjectof the change. Finally, the ChangeCNN identifies the change (orinventory event type) for every location (pixel) in the outputindicating whether the item identified is taken from the shelf or put onthe shelf. The above three parts of the output from ChangeCNN aredescribed by an expression “5*B+C+1”. Each bounding box “B” predictioncomprises of five (5) numbers, therefore “B” is multiplied by 5. Thesefive numbers represent the “x” and “y” coordinates of the center of thebounding box, the width and height of the bounding box. The fifth numberrepresents ChangeCNN model's confidence score for prediction of thebounding box. “B” is a hyperparameter that can be adjusted to improvethe performance of the ChangeCNN model. In one embodiment, the value of“B” equals 4. Consider the width and height (in pixels) of the outputfrom ChangeCNN is represented by W and H, respectively. The output ofthe ChangeCNN is then expressed as “W*H*(5*B+C+1)”. The bounding boxoutput model is based on object detection system proposed by Redmon andFarhadi in their paper, “YOLO9000: Better, Faster, Stronger” publishedon Dec. 25, 2016. The paper is available athttps://arxiv.org/pdf/1612.08242.pdf.

The outputs of ChangeCNN 2714 a-2714 n corresponding to sequences ofimages from cameras with overlapping fields of view are combined by acoordination logic component 2718. The coordination logic componentprocesses change data structures from sets of cameras having overlappingfields of view to locate the identified background changes in realspace. The coordination logic component 2718 selects bounding boxesrepresenting the inventory items having the same SKU and the sameinventory event type (take or put) from multiple cameras withoverlapping fields of view. The selected bounding boxes are thentriangulated in the 3D real space using triangulation techniquesdescribed above to identify the location of the inventory item in 3Dreal space. Locations of shelves in the real space are compared with thetriangulated locations of the inventory items in the 3D real space.False positive predictions are discarded. For example, if triangulatedlocation of a bounding box does not map to a location of a shelf in thereal space, the output is discarded. Triangulated locations of boundingboxes in the 3D real space that map to a shelf are considered truepredictions of inventory events.

In one embodiment, the classifications of identified background changesin the change data structures produced by the second image processorsclassify whether the identified inventory item has been added or removedrelative to the background image. In another embodiment, theclassifications of identified background changes in the change datastructures indicate whether the identified inventory item has been addedor removed relative to the background image and the system includeslogic to associate background changes with identified subjects. Thesystem makes detections of takes of inventory items by the identifiedsubjects and of puts of inventory items on inventory display structuresby the identified subjects.

A log generator 2720 implements the logic to associate changesidentified by true predictions of changes with identified subjects nearthe location of the change. In an embodiment utilizing the jointsidentification engine to identify subjects, the log generator 2720determines the positions of hand joints of subjects in the 3D real spaceusing joint data structures 800. A subject whose hand joint location iswithin a threshold distance to the location of a change at the time ofthe change is identified. The log generator associates the change withthe identified subject.

In one embodiment, as described above, N masked images are combined togenerate factored images which are then given as input to the ChangeCNN.Consider, N equals the frame rate (frames per second) of the cameras114. Thus, in such an embodiment, the positions of hands of subjectsduring a one second time period are compared with the location of thechange to associate the changes with identified subjects. If more thanone subject's hand joint locations are within the threshold distance toa location of a change, then association of the change with a subject isdeferred to output of the foreground image processing subsystem 2606.

The foreground image processing (region proposals) subsystem 2606 (alsoreferred to as the third image processors) include foreground imagerecognition engines receiving images from the sequences of images fromthe plurality of cameras. The third image processors include logic toidentify and classify foreground changes represented in the images inthe corresponding sequences of images. The region proposals subsystem2606 produces a second set of detections of takes of inventory items bythe identified subjects and of puts of inventory items on inventorydisplay structures by the identified subjects. As shown in FIG. 27, thesubsystem 2606 includes the bounding box generator 1504, the WhatCNN1506 and the WhenCNN 1508. The joint data structures 800 and imageframes per camera from the circular buffer 1502 are given as input tothe bounding box generator 1504. The details of the bounding boxgenerator 1504, the WhatCNN 1506 and the WhenCNN 1508 are presentedearlier.

The system described in FIG. 27 includes the selection logic to processthe first and second sets of detections to generate log data structuresincluding lists of inventory items for identified subjects. The firstset of detections of takes of inventory items by the identified subjectsand of puts of inventory items on inventory display structures by theidentified subjects are generated by the log generator 2720. The firstset of detections are determined using the outputs of second imageprocessors and the joint data structures 800 as described above. Thesecond set of detections of takes of inventory items by the identifiedsubjects and of puts of inventory items on inventory display structuresby the identified subjects are determined using the output of the thirdimage processors. For each true inventory event (take or put), theselection logic controller 2608 selects the output from either thesecond image processors (semantic diffing subsystem 2604) or the thirdimage processors (region proposals subsystem 2606). In one embodiment,the selection logic selects the output from an image processor with ahigher confidence score for prediction of that inventory event.

Process Flow of Background Image Semantic Diffing

FIGS. 28A and 28B present detailed steps performed by the semanticdiffing subsystem 2604 to track changes by subjects in an area of realspace. In the example of a shopping store the subjects are customers andemployees of the store moving in the store in aisles between shelves andother open spaces. The process starts at step 2802. As described above,the cameras 114 are calibrated before sequences of images from camerasare processed to identify subjects. Details of camera calibration arepresented above. Cameras 114 with overlapping fields of view captureimages of real space in which subjects are present. In one embodiment,the cameras are configured to generate synchronized sequences of imagesat the rate of N frames per second. The sequences of images of eachcamera are stored in respective circular buffers 1502 per camera at step2804. A circular buffer (also referred to as a ring buffer) stores thesequences of images in a sliding window of time. The background imagestore 2704 is initialized with initial image frame in the sequence ofimage frames per camera with no foreground subjects (step 2806).

As subjects move in front of the shelves, bounding boxes per subject aregenerated using their corresponding joint data structures 800 asdescribed above (step 2808). At a step 2810, a masked image is createdby replacing the pixels in the bounding boxes per image frame by pixelsat the same locations from the background image from the backgroundimage store 2704. The masked image corresponding to each image in thesequences of images per camera is stored in the background image store2704. The ith masked image is used as a background image for replacingpixels in the following (i+1) image frame in the sequence of imageframes per camera.

At a step 2812, N masked images are combined to generate factoredimages. At a step 2814, a difference heat map is generated by comparingpixel values of pairs of factored images. In one embodiment, thedifference between pixels at a location (x, y) in a 2D space of the twofactored images (fi1 and fi2) is calculated as shown below in equation1:

$\begin{matrix}\sqrt{\begin{pmatrix}{\left( {{{fi}\;{{1\left\lbrack {x,y} \right\rbrack}\lbrack{red}\rbrack}} - {{fi}\;{{2\left\lbrack {x,y} \right\rbrack}\lbrack{red}\rbrack}}} \right)^{2} +} \\{\left( {{{fi}\;{{1\left\lbrack {x,y} \right\rbrack}\lbrack{green}\rbrack}} - {{fi}\;{{2\left\lbrack {x,y} \right\rbrack}\lbrack{green}\rbrack}}} \right)^{2} +} \\\left( {{{fi}\;{{1\left\lbrack {x,y} \right\rbrack}\lbrack{blue}\rbrack}} - {{fi}\;{{2\left\lbrack {x,y} \right\rbrack}\lbrack{blue}\rbrack}}} \right)^{2}\end{pmatrix}} & (1)\end{matrix}$

The difference between the pixels at the same x and y locations in the2D space is determined using the respective intensity values of red,green and blue (RGB) channels as shown in the equation. The aboveequation gives a magnitude of the difference (also referred to asEuclidean norm) between corresponding pixels in the two factored images.

The difference heat map can contain noise due to sensor noise andluminosity changes in the area of real space. In FIG. 28B, at a step2816, a bit mask is generated for a difference heat map. Semanticallymeaningful changes are identified by clusters of is (ones) in the bitmask. These clusters correspond to changes identifying inventory itemstaken from the shelf or put on the shelf. However, noise in thedifference heat map can introduce random is in the bit mask.Additionally, multiple changes (multiple items take from or put on theshelf) can introduce overlapping clusters of 1 s. At a next step (2818)in the process flow, image morphology operations are applied to the bitmask. The image morphology operations remove noise (unwanted 1 s) andalso attempt to separate overlapping clusters of 1 s. This results in acleaner bit mask comprising clusters of 1 s corresponding tosemantically meaningful changes.

Two inputs are given to the morphological operation. The first input isthe bit mask and the second input is called a structuring element orkernel. Two basic morphological operations are “erosion” and “dilation”.A kernel consists of is arranged in a rectangular matrix in a variety ofsizes. Kernels of different shapes (for example, circular, elliptical orcross-shaped) are created by adding 0's at specific locations in thematrix. Kernels of different shapes are used in image morphologyoperations to achieve desired results in cleaning bit masks. In erosionoperation, a kernel slides (or moves) over the bit mask. A pixel (either1 or 0) in the bit mask is considered 1 if all the pixels under thekernel are 1 s. Otherwise, it is eroded (changed to 0). Erosionoperation is useful in removing isolated is in the bit mask. However,erosion also shrinks the clusters of is by eroding the edges.

Dilation operation is the opposite of erosion. In this operation, when akernel slides over the bit mask, the values of all pixels in the bitmask area overlapped by the kernel are changed to 1, if value of atleast one pixel under the kernel is 1. Dilation is applied to the bitmask after erosion to increase the size clusters of 1 s. As the noise isremoved in erosion, dilation does not introduce random noise to the bitmask. A combination of erosion and dilation operations are applied toachieve cleaner bit masks. For example the following line of computerprogram code applies a 3×3 filter of is to the bit mask to perform an“open” operation which applies erosion operation followed by dilationoperation to remove noise and restore the size of clusters of is in thebit mask as described above. The above computer program code uses OpenCV(open source computer vision) library of programming functions for realtime computer vision applications. The library is available athttps://opencv.org/. _bit_mask=cv2.morphologyEx(bit_mask,cv2.MORPH_OPEN, self.kernel_3×3, dst=_bit_mask)

A “close” operation applies dilation operation followed by erosionoperation. It is useful in closing small holes inside the clusters of 1s. The following program code applies a close operation to the bit maskusing a 30×30 cross-shaped filter. _bit_mask=cv2.morphologyEx(bit_mask,cv2.MORPH_CLOSE, self.kernel_30×30_cross, dst=_bit_mask)

The bit mask and the two factored images (before and after) are given asinput to a convolutional neural network (referred to as ChangeCNN above)per camera. The outputs of ChangeCNN are the change data structures. Ata step 2822, outputs from ChangeCNNs with overlapping fields of view arecombined using triangulation techniques described earlier. A location ofthe change in the 3D real space is matched with locations of shelves. Iflocation of an inventory event maps to a location on a shelf, the changeis considered a true event (step 2824). Otherwise, the change is a falsepositive and is discarded. True events are associated with a foregroundsubject. At a step 2826, the foreground subject is identified. In oneembodiment, the joints data structure 800 is used to determine locationof a hand joint within a threshold distance of the change. If aforeground subject is identified at the step 2828, the change isassociated to the identified subject at a step 2830. If no foregroundsubject is identified at the step 2828, for example, due to multiplesubjects' hand joint locations within the threshold distance of thechange. Then redundant detection of the change by region proposalssubsystem is selected at a step 2832. The process ends at a step 2834.

Training the ChangeCNN

A training data set of seven channel inputs is created to train theChangeCNN. One or more subjects acting as customers, perform take andput actions by pretending to shop in a shopping store. Subjects move inaisles, taking inventory items from shelve and putting items back on theshelves. Images of actors performing the take and put actions arecollected in the circular buffer 1502. The images are processed togenerate factored images as described above. Pairs of factored images2706 and corresponding bit mask output by the bit mask calculator 2710are manually reviewed to visually identify a change between the twofactored images. For a factored image with a change, a bounding box ismanually drawn around the change. This is the smallest bounding box thatcontains the cluster of 1s corresponding to the change in the bit mask.The SKU number for the inventory item in the change is identified andincluded in the label for the image along with the bounding box. Anevent type identifying take or put of inventory item is also included inthe label of the bounding box. Thus the label for each bounding boxidentifies, its location on the factored image, the SKU of the item andthe event type. A factored image can have more than one bounding boxes.The above process is repeated for every change in all collected factoredimages in the training data set. A pair of factored images along withthe bit mask forms a seven channel input to the ChangeCNN.

During training of the ChangeCNN, forward passes and backpropagationsare performed. In the forward pass, the ChangeCNN identify and classifybackground changes represented in the factored images in thecorresponding sequences of images in the training data set. TheChangeCNN process identified background changes to make a first set ofdetections of takes of inventory items by identified subjects and ofputs of inventory items on inventory display structures by identifiedsubjects. During backpropagation the output of the ChangeCNN is comparedwith the ground truth as indicated in labels of training data set. Agradient for one or more cost functions is calculated. The gradient(s)are then propagated to the convolutional neural network (CNN) and thefully connected (FC) neural network so that the prediction error isreduced causing the output to be closer to the ground truth. In oneembodiment, a softmax function and a cross-entropy loss function is usedfor training of the ChangeCNN for class prediction part of the output.The class prediction part of the output includes an SKU identifier ofthe inventory item and the event type i.e., a take or a put.

A second loss function is used to train the ChangeCNN for prediction ofbounding boxes. This loss function calculates intersection over union(IOU) between the predicted box and the ground truth box. Area ofintersection of bounding box predicted by the ChangeCNN with the truebounding box label is divided by the area of the union of the samebounding boxes. The value of IOU is high if the overlap between thepredicted box and the ground truth boxes is large. If more than onepredicted bounding boxes overlap the ground truth bounding box, then theone with highest IOU value is selected to calculate the loss function.Details of the loss function are presented by Redmon et. al., in theirpaper, “You Only Look Once: Unified, Real-Time Object Detection”published on May 9, 2016. The paper is available athttps://arxiv.org/pdf/1506.02640.pdf.

Particular Implementations

In various embodiments, the system for tracking puts and takes ofinventory items by subjects in an area of real space described abovealso includes one or more of the following features.

1. Region Proposals

A region proposal is the frame image of hand location from all differentcameras covering the person. A region proposal is generated by everycamera in the system. It includes empty hands as well as hands carryingstore items.

1.1 The WhatCNN Model

A region proposal can be used as input to image classification using adeep learning algorithm. This classification engine is called a“WhatCNN” model. It is an in-hand classification model. It classifiesthe things that are in hands. In-hand image classification can operateeven though parts of the object are occluded by the hand. Smaller itemsmay be occluded up to 90% by the hand. The region for image analysis bythe WhatCNN model is intentionally kept small in some embodimentsbecause it is computationally expensive. Each camera can have adedicated GPU. This is performed for every hand image from every camerafor every frame. In addition to the above image analysis by the WhatCNNmodel, a confidence weight is also assigned to that image (one camera,one point in time). The classification algorithm outputs logits over theentire list of stock keeping units (SKUs) to produce a product andservice identification code list of the store for n items and oneadditional for an empty hand (n+1).

The scene process now communicates back its results to each videoprocess by sending a key-value dictionary to each video. Here keys areunique joint IDs and values are unique person IDs with which the jointis associated. If no person was found associated with the joint, then itis not included in the dictionary.

Each video process receives the key-value dictionary from the sceneprocess and stores it into a ring buffer that maps frame numbers to thereturned dictionary.

Using the returned key-value dictionary, the video selects subsets ofthe image at each moment in time that are near hands associated withknown people. These regions are numpy slices. We also take a similarslice around foreground masks and the raw output feature arrays of theJoints CNN. These combined regions are concatenated together into asingle multidimensional numpy array and stored in a data structure thatholds the numpy array as well as the person ID with which the region isassociated and which hand from the person the region came from.

All proposed regions are then fed into a FIFO queue. This queue takes inregions and pushes their numpy array into memory on the GPU.

As arrays arrive on the GPU they are fed into a CNN dedicated toclassification, referred to as a WhatCNN. The output of this CNN is aflat array of floats of size N+1, where N is the number of unique SKUsin the store, and the final class represents the nil class, or emptyhand. The floats in this array are referred to as logits.

The results of the WhatCNN are stored back into the region datastructure.

All regions for a moment in time are then sent from each video processback to the scene process.

The scene process receives all regions from all videos at a moment intime and stores the results in a key-value dictionary, where the key isa person ID and the value is a key-value dictionary, where the key is acamera ID and the value is a region's logits.

This aggregated data structure is then stored in a ring buffer that mapsframe numbers to the aggregated structure for each moment in time.

1.2 The WhenCNN Model

The images from different cameras processed by the WhatCNN model arecombined over a period of time (multiple cameras over a period of time).An additional input to this model is hand location in 3D space,triangulated from multiple cameras. Another input to this algorithm isthe distance of a hand from a planogram of the store. In someembodiments, the planogram can be used to identify if the hand is closeto a shelf containing a particular item (e.g. cheerios boxes). Anotherinput to this algorithm is the foot location on the store.

In addition to object classification using SKU, the secondclassification model uses time series analysis to determine whether theobject was picked up from the shelf or placed on the shelf. The imagesare analyzed over a period of time to make the determination of whetherthe object that was in the hand in earlier image frames has been putback in the shelf or has been picked up from the shelf.

For a one second time (30 frames per second) period and three cameras,the system will have 90 classifications outputs for the same hand plusconfidences. This combined image analysis dramatically increases theprobability of correctly identifying the object in the hand. Theanalysis over time improves the quality of output despite some very lowconfidence level outputs of individual frames. This step can take theoutput confidence from for example, 80% accuracy to 95% accuracy.

This model also includes output from the shelf model as its input toidentify what object this person has picked.

The scene process waits for 30 or more aggregated structures toaccumulate, representing at least a second of real time, and thenperforms a further analysis to reduce the aggregated structure down to asingle integer for each person ID-hand pair, where the integer is aunique ID representing a SKU in the store. For a moment in time thisinformation is stored in a key-value dictionary where keys are personID-hand pairs, and values are the SKU integer. This dictionary is storedover time in a ring buffer that maps frame numbers to each dictionaryfor that moment in time.

An additional analysis can be then performed looking at how thisdictionary changes over time in order to identify at what moments aperson takes something and what it is they take. This model (WhenCNN)emits SKU logits as well as logits for each Boolean question: wassomething taken? was something placed?

The output of the WhenCNN is stored in a ring buffer that maps framenumbers to a key-value dictionary where keys are person IDs and valuesare the extended logits emitted by the WhenCNN.

A further collection of heuristics is then run on the stored results ofboth the WhenCNN and the stored joint locations of people, as well as aprecomputed map of items on the store shelf. This collection ofheuristics determines where takes and puts result in items being addedto or removed from. For each take/put the heuristics determine if thetake or put was from or to a shelf, from or to a basket, or from or to aperson. The output is an inventory for each person, stored as an arraywhere the array value at a SKU's index is the number of those SKUs aperson has.

As a shopper nears the exit of a store the system can send the inventorylist to the shopper's phone. The phone then displays the user'sinventory and asks for confirmation to charge their stored credit cardinformation. If the user accepts, their credit card will be charged. Ifthey do not have a credit card known in the system, they will be askedto provide credit card information.

Alternatively, the shopper may also approach an in-store kiosk. Thesystem identifies when the shopper is near the kiosk and will send amessage to the kiosk to display the inventory of the shopper. The kioskasks the shopper to accept the charges for the inventory. If the shopperaccepts, they may then swipe their credit card or insert cash to pay.FIG. 16 presents an illustration of the WhenCNN model for regionproposals.

2. Misplaced Items

This feature identifies misplaced items when they are placed back by aperson on a random shelf. This causes problems in object identificationbecause the foot and hand location with respect to the planogram will beincorrect. Therefore, the system builds up a modified planogram overtime. Based on prior time series analysis, the system is able todetermine if a person has placed an item back in the shelf. Next time,when an object is picked up from that shelf location, the system knowsthat there is at least one misplaced item in that hand location.Correspondingly, the algorithm will have some confidence that the personcan pick up the misplaced item from that shelf. If the misplaced item ispicked up from the shelf, the system subtracts that item from thatlocation and therefore, the shelf does not have that item anymore. Thesystem can also inform a clerk about a misplaced item via an app so thatthe clerk can move that item to its correct shelf.

3. Semantic Diffing (Shelf Model)

An alternative technology for background image processing comprises abackground subtraction algorithm to identify changes to items (itemsremoved or placed) on the shelves. This is based on changes at the pixellevel. If there are persons in front of the shelf, then the algorithmstops so that it does not take into account pixel changes due topresence of persons. Background subtraction is a noisy process.Therefore, a cross-camera analysis is conducted. If enough cameras agreethat there is a “semantically meaningful” change in the shelf, then thesystem records that there is a change in that part of the shelf.

The next step is to identify whether that change is a “put” or a “get”change. For this, the time series analysis of the second classificationmodel is used. A region proposal for that particular part of the shelfis generated and passed through the deep learning algorithm. This iseasier than in-hand image analysis because the object is not occludedinside a hand. A fourth input is given to the algorithm in addition tothe three typical RGB inputs. The fourth channel is the backgroundinformation. The output of the shelf or semantic diffing is input againto the second classification model (time-series analysis model).

Semantic diffing in this approach includes the following steps:

-   1. Images from a camera are compared to earlier images from the same    camera.-   2. Each corresponding pixel between the two images is compared via a    Euclidean distance in RGB space.-   3. Distances above a certain threshold are marked, resulting in a    new image of just marked pixels.-   4. A collection of image morphology filters are used to remove noise    from the marked image.-   5. We then search for large collections of marked pixels and form    bounding boxes around them.-   6. For each bounding box we then look at the original pixels in the    two images to get two image snapshots.-   7. These two image snapshots are then pushed into a CNN trained to    classify whether the image region represents an item being taken or    an item being placed and what the item is.

3. Store Audit

An inventory of each shelf is maintained by the system. It is updated asitems are picked up by the customers. At any point in time, the systemis able to generate an audit of store inventory.

4. Multiple Items in Hand

Different images are used for multiple items. Two items in the hand aretreated differently as compared to one. Some algorithms can predict onlyone item but not multiple numbers of an item. Therefore, the CNNs aretrained so the algorithms for “two” quantities of the items can beexecuted separately from a single item in the hand.

5. Data Collection System

Predefined shopping scripts are used to collect good quality data ofimages. These images are used for training of algorithms.

5.1 Shopping Scripts

Data collection includes the following steps:

-   1. A script is automatically generated telling a human actor what    actions to take.-   2. These actions are randomly sampled from a collection of actions    including: take item X, place item X, hold item X for Y seconds.-   3. While performing these actions the actors move and orient    themselves in as many ways as possible while still succeeding at the    given action.-   4. During the sequences of actions a collection of cameras record    the actors from many perspectives.-   5. After the actors have finished the script, the camera videos are    bundled together and saved along with the original script.-   6. The script serves as an input label to machine learning models    (such as the CNNs) that train on the videos of actors.

6. Product Line

The system and parts thereof can be used for cashier-less checkout,supported by the following apps.

6.1 Store App

The Store App has several main capabilities; providing data analyticvisualizations, supporting loss prevention, and providing a platform toassist customers by showing the retailer where people are in the storeand what merchandise they have collected. Permission levels and appaccess to employees can be dictated at the retailer's discretion.

6.1.1 Standard Analytics

Data is collected by the platform and can be used in a variety of ways.

-   1. The derivative data is used to perform various kinds of analytics    on stores, the shopping experiences they provide, and customer    interactions with products, environment, and other people.    -   a. The data is stored and used in the background to perform        analyses of the store and customer interactions. The Store App        will display some of the visualizations of this data to        retailers. Other data is stored and queried when the data point        is desired. A frontend system for analytics on PC/Mac/online        portal is on the roadmap for future development.-   2. Heat Maps:

The platform visualizes a retailer's floor plan, shelf layouts, andother store environments with overlays showing levels of various kindsof activity.

-   1. Examples:    -   1. Maps for places people walk past, but don't handle any of the        products.    -   2. Maps for where on the floor people stand when interacting        with products.    -   3. Misplaced Items:

The platform tracks all of a store's SKUs. When an item gets put in theincorrect place, the platform will know where that item is and build alog. At some threshold, or immediately, store employees may be alertedto the misplaced item. Alternatively, the staff may access the MisplacedItem Map in the Store App. When convenient, staff can then quicklylocate and correct misplaced items.

6.1.2 Standard Assist

-   The Store App will display a store's floor plan.-   It will display a graphic to represent each person in the store.-   When the graphic is selected, via touch, click, or other means,    pertinent information to store employees will be displayed. For    example: Shopping Cart items (items they have collected) will appear    in a list.-   If the platform has a confidence level below a predetermined    threshold for a particular item(s) and for a period of time that is    in a person's possession (Shopping Cart), their graphic (currently a    dot) will indicate the difference. Currently the app uses a color    change. Green indicates high confidence and yellow/orange indicates    lower confidence.-   Store employees with the Store App can be notified of the lower    confidence. They can go make sure the customer's Shopping Cart is    accurate.-   Through the Store App, employees of the retailer will be able to    adjust a customer's Shopping Cart items (add or delete).

6.1.3 Standard LP

-   If a shopper is using the Shopper App, they simply exit the store    and are charged. However, if they are not, they will need to use the    Guest App to pay for the items in their Shopping Cart.-   If the shopper bypasses the Guest App on their way out of the store,    their graphic indicates they must be approached before exiting.    Currently the App uses a change of color to red. Staff also receive    a notification of potential loss.-   Through the Store App, employees of the retailer will be able to    adjust a customer's Shopping Cart items (add or delete).

6.2 Non-Store App

The following analytic features represent additional capabilities of theplatform. These analytics, however, are not available on the Store App.They are available through the backend system. The ability to accessthrough a frontend experience for PC/Mac or via online portal is builtpart of the development roadmap.

6.2.1 Standard Analytics

-   1. Product Interactions:

Granular breakdown of product interactions such as:

-   -   a. Interaction time to conversion ratios for each product.    -   b. AB comparisons (color, style, etc.). Some of the smaller        products on display have multiple options like colors, flavors,        etc.        -   Is the rose gold handled more than the silver?        -   Do blue cans attract more interactions than red ones?

-   2. Directional Impressions:

Know the difference between a location based impression and where theshopper's gaze is. If they are looking at a product that is 15 feetaway, for 20 seconds, the impression should not count for where theyare, but for where they are looking.

-   3. Customer Recognition:

Remember repeat shoppers and their associated email address (collectedin a variety of ways by the retailer) and shopping profiles. The currentsystem would require them to opt in each time they visit, but will allowfor auto recognition in the future.

-   4. Group Dynamics:

Decide when a shopper is watching someone else interact with a product.

-   -   Answer whether that person interacts with the product        afterwards?    -   Did those people enter the store together, or are they likely        strangers?    -   Do individuals or groups of people spend more time in the store?

-   5. Customer Touchback:

Offer customers targeted information, post store experience. Thisfeature may have a slightly different implementation with each retailerdepending on particular practices and policies. It may requireintegration and/or development from the retailer to adopt the feature.

-   -   Shoppers would be asked if they wished to receive notifications        about products they might be interested in. That step may be        integrated with the store's method of collecting emails.    -   After leaving the store, a customer may receive an email with        the products they spent time with at the store. An interaction        threshold for duration, touch, and sight (direction impressions)        will be decided. When the threshold is met, the products would        make it to her list and be sent to her soon after leaving the        store.

Additionally, or alternatively, the shopper could be sent an email aperiod of time later that offered product(s) on sale or other specialinformation. These products will be items they expressed interest in,but did not purchase.

6.3 Guest App

The Shopper App automatically checks people out when they exit thestore. However, the platform does not require shoppers to have or usethe Shopper App to use the store.

When a shopper/person does not have or use the Shopper App they walk upto a kiosk (an iPad/tablet or other screen) or they walk up to apre-installed self-checkout machine. The display, integrated with theplatform, will automatically display the customer's Shopping Cart.

The shopper will have the opportunity to review what is displayed. Ifthey agree with the information on the display they can either entercash into the machine (if that capability is built into the hardware(e.g. self-checkout machines)) or they swipe their credit or debit card.They can then exit the store.

If they disagree with the display, store staff is notified by theirselection to challenge through a touch screen, button, or other means.(see the Store Assist under the Store App)

6.4 Shopper App

Through use of an app, the Shopper App, the customer can exit the storewith merchandise and automatically be charged and given a digitalreceipt. The shopper must open their app at any time while within thestore's shopping area. The platform will recognize a unique image thatis displayed on the shopper's device. The platform will tie them totheir account (Customer Association), and regardless if they keep theapp open or not, will be able to remember who they are throughout theirtime in the store's shopping area.

As the shopper gathers items, the Shopper App will display the items inshopper's Shopping Cart. If the shopper wishes, they can view productinformation about each item they pick up (i.e. gets added to theirshopping cart). Product information is stored either with the store'ssystems or added to a platform. The ability for updating thatinformation, such as offering product sales or displaying prices, is anoption the retailer can request/purchase or develop.

When a shopper puts an item down, it is removed from their Shopping Carton the backend and on the Shopper App.

If the Shopper App is opened, and then closed after Customer Associationis completed, the Platform will maintain the shopper's Shopping Cart andcorrectly charge them once they exit the store.

The Shopper App also has mapping information on its development roadmap.It can tell a customer where to find items in the store if the customerrequests the information by typing in the item being sought. At a laterdate, we will take a shopper's shopping list (entered into the appmanually or through other intelligent systems) and display the fastestroute through the store to collect all the desired items. Other filters,such as ‘Bagging Preference’ may be added. The Bagging Preference filterallows a shopper to not follow the fastest route, but to gather sturdieritems first, then more fragile items later.

7. Types of Customers

Member customer—First type of customer logs into the system using anapp. The customer is prompted with a picture and when s/he clicks on it,the system links that to the internal id of that customer. If thecustomer has an account, then the account is charged automatically whenthe customer walks out of the store. This is the membership based store.

Guest customer—Not every store will have membership, or customers maynot have a smartphone or a credit card. This type of customer will walkup to a kiosk. The kiosk will display the items that the customer hasand will ask the customer to put in the money. The kiosk will alreadyknow about all the items that the customer has bought. For this type ofcustomer, the system is able to identify if the customer has not paidfor the items in the shopping cart, and prompt the checker at the door,before the customer reaches there, to let the checker know about unpaiditems. The system can also prompt for one item that has not been paidfor, or the system having low confidence about one item. This isreferred to as predictive pathfinding.

The system assigns color codes (green and yellow) to the customerswalking in the store based on the confidence level. The green colorcoded customers are either logged into the system or the system has ahigh confidence about them. Yellow color coded customers have one ormore items that are not predicted with high confidence. A clerk can lookat the yellow dots and click on them to identify problem items, walk upto the customer and fix the problem.

8. Analytics

A host of analytics information is gathered about the customer such ashow much time a customer spent in front of a particular shelf.Additionally, the system tracks the location where a customer is looking(impression on the system), and the items which a customer picked andput back on the shelf. Such analytics are currently available inecommerce but not available in retail stores.

9. Functional Modules

The following is a list of functional modules:

-   1. System capturing array of images in store using synchronized    cameras.-   2. System to identify joints in images, and sets of joints of    individual persons.-   3. System to create new persons using joint sets.-   4. System to delete ghost persons using joint sets.-   5. System to track individual persons over time by tracking joint    sets.-   6. System to generate region proposals for each person present in    the store indicating the SKU number of item in the hand (WhatCNN).-   7. System to perform get/put analysis for region proposals    indicating if the item in the hand was picked up or placed onto the    shelf (WhenCNN).-   8. System to generate inventory array per person using region    proposals and get/put analysis (Outputs of WhenCNN combined with    heuristics, stored joint locations of persons, and precomputed map    of items on the store shelves).-   9. System to identify, track and update locations of misplaced items    on shelves.-   10. System to track changes (get/put) to items on shelves using    pixel-based analysis.-   11. System to perform inventory audit of store.-   12. System to identify multiple items in hands.-   13. System to collect item image data from store using shopping    scripts.-   14. System to perform checkout and collect payment from member    customers.-   15. System to perform checkout and collect payment from guest    customers.-   16. System to perform loss-prevention by identifying un-paid items    in a cart.-   17. System to track customers using color codes to help clerks    identify incorrectly identified items in a customer's cart.-   18. System to generate customer shopping analytics including    location-based impressions, directional impressions, A/B analysis,    customer recognition, group dynamics etc.-   19. System to generate targeted customer touchback using shopping    analytics.-   20. System to generate heat map overlays of the store to visualize    different activities.

The technology described herein can support Cashier-free Checkout. Go toStore. Take Things. Leave.

Cashier-free Checkout is a pure machine vision and deep learning basedsystem. Shoppers skip the line and get what they want faster and easier.No RFID tags. No changes to store's backend systems. Can be integratedwith 3^(rd) party Point of Sale and Inventory Management systems.

-   -   Real time 30 FPS analysis of every video feed.    -   On-premise, cutting edge GPU cluster.    -   Recognizes shoppers and the items they interact with.    -   No interne dependencies in example embodiment.    -   Multiple state-of-the-art deep learning models, including        proprietary custom algorithms, to resolve gaps in machine vision        technology for the first time.

Techniques & Capabilities include the following:

-   -   1. Standard Cognition's machine learning pipeline solves:        -   a) People Detection.        -   b) Entity Tracking.        -   c) Multicamera Person Agreement.        -   d) Hand Detection.        -   e) Item Classification.        -   f) Item Ownership Resolution.

Combining these techniques, we can:

-   1. Keep track of all people throughout their shopping experience in    real time.-   2. Know what shoppers have in their hand, where they stand, and what    items they place back.-   3. Know which direction shoppers are facing and for how long.-   4. Recognize misplaced items and perform 24/7 Visual Merchandizing    Audits.

Can detect exactly what a shopper has in their hand and in their basket.

Learning Your Store:

Custom neural networks trained on specific stores and items. Trainingdata is reusable across all store locations.

Standard Deployment:

Ceiling cameras must be installed with double coverage of all areas ofthe store. Requires between 2 and 6 cameras for a typical aisle.

An on-premise GPU cluster can fit into one or two server racks in a backoffice.

Example systems can be integrated with or include Point of Sale andInventory Management systems.

A first system, method and computer program product for capturing arraysof images in stores using synchronized cameras.

A second system, method and computer program product to identify jointsin images, and sets of joints of individual persons.

A third system, method and computer program product to create newpersons using joint sets.

A fourth system, method and computer program product to delete ghostpersons using joint sets.

A fifth system, method and computer program product to track individualpersons over time by tracking joint sets.

A sixth system, method and computer program product to generate regionproposals for each person present in the store indicating the SKU numberof an item in the hand (WhatCNN).

A seventh system, method and computer program product to perform get/putanalysis for region proposals indicating if the item in the hand waspicked up or placed onto the shelf (WhenCNN).

An eighth system, method and computer program product to generate aninventory array per person using region proposals and get/put analysis(e.g. Outputs of WhenCNN combined with heuristics, stored jointlocations of persons, and precomputed map of items on the storeshelves).

A ninth system, method and computer program product to identify, trackand update locations of misplaced items on shelves.

A tenth system, method and computer program product to track changes(get/put) to items on shelves using pixel-based analysis.

An eleventh system, method and computer program product to performinventory audits of a store.

A twelfth system, method and computer program product to identifymultiple items in hands.

A thirteenth system, method and computer program product to collect itemimage data from a store using shopping scripts.

A fourteenth system, method and computer program product to performcheckout and collect payment from member customers.

A fifteenth system, method and computer program product to performcheckout and collect payment from guest customers.

A sixteenth system, method and computer program product to performloss-prevention by identifying un-paid items in a cart.

A seventeenth system, method and computer program product to trackcustomers using for example color codes to help clerks identifyincorrectly identified items in a customer's cart.

An eighteenth system, method and computer program product to generatecustomer shopping analytics including one or more of location-basedimpressions, directional impressions, A/B analysis, customerrecognition, group dynamics etc.

A nineteenth system, method and computer program product to generatetargeted customer touchback using shopping analytics.

A twentieth system, method and computer program product to generate heatmap overlays of the store to visualize different activities.

A twenty first system, method and computer program for Hand Detection.

A twenty second system, method and computer program for ItemClassification.

A twenty third system, method and computer program for Item OwnershipResolution.

A twenty fourth system, method and computer program for Item PeopleDetection.

A twenty fifth system, method and computer program for Item EntityTracking.

A twenty sixth method and computer program for Item Multicamera PersonAgreement.

A twenty seventh system, method and computer program product forcashier-less checkout substantially as described herein.

Combinations of any of systems 1-26 with any other system or systems insystems 1-26 listed above.

Described herein is a method for tracking puts and takes of inventoryitems by subjects in an area of real space, comprising:

-   -   using a plurality of cameras to produce respective sequences of        images of corresponding fields of view in the real space, the        field of view of each camera overlapping with the field of view        of at least one other camera in the plurality of cameras;    -   receiving the sequences of images from the plurality of cameras,        and using first image recognition engines to process images to        generate first data sets that identify subjects and locations of        the identified subjects in the real space;

processing the first data sets to specify bounding boxes which includeimages of hands of identified subjects in images in the sequences ofimages;

-   -   receiving the sequences of images from the plurality of cameras,        and processing the specified bounding boxes in the images to        generate a classification of hands of the identified subjects        using second image recognition engines, the classification        including whether the identified subject is holding an inventory        item, a first nearness classification indicating a location of a        hand of the identified subject relative to a shelf, a second        nearness classification indicating a location of a hand of the        identified subject relative to a body of the identified subject,        a third nearness classification indicating a location of a hand        of the identified subject relative to a basket associated with        an identified subject, and an identifier of a likely inventory        item; and    -   processing the classifications of hands for sets of images in        the sequences of images of identified subjects to detect takes        of inventory items by identified subjects and puts of inventory        items on inventory display structures by identified subjects.

In this described method the first data sets can comprise for eachidentified subject sets of candidate joints having coordinates in realspace.

This described method can include processing the first data sets tospecify bounding boxes includes specifying bounding boxes based onlocations of joints in the sets of candidate joints for each subject.

In this described method one or both of the first and the second imagerecognition engines can comprise convolutional neural networks.

This described method can include processing the classifications ofbounding boxes using convolutional neural networks.

A computer program product and products are described which include acomputer readable memory comprising a non-transitory data storagemedium, and computer instructions stored in the memory executable by acomputer to track puts and takes of inventory items by subjects in anarea of real space by any of the herein described processes.

A system is described comprising a plurality of cameras producing asequences of images including a hand of a subject; and a processingsystem coupled to the plurality of cameras, the processing systemincluding a hand image recognition engine, receiving the sequence ofimages, to generate classifications of the hand in time sequence, andlogic to process the classifications of the hand from the sequence ofimages to identify an action by the subject, wherein, the action is oneof puts and takes of inventory items.

The system can include logic to identify locations of joints of thesubject in the images in the sequences of images, and to identifybounding boxes in corresponding images that include the hands of thesubject based on the identified joints.

A computer program listing appendix accompanies the specification, andincludes portions of an example of a computer program to implementcertain parts of the system provided in this application. The appendixincludes examples of heuristics to identify joints of subjects andinventory items. The appendix presents computer program code to update asubject's shopping cart data structure. The appendix also includes acomputer program routine to calculate learning rate during training of aconvolutional neural network. The appendix includes a computer programroutine to store classification results of hands of subjects from aconvolutional neural network in a data structure per hand per subjectper image frame from each camera.

What is claimed is:
 1. A system for tracking subjects in an area of realspace, comprising: a first sensor to produce a first sequence of imagesof a first field of view in the real space; a first image processor incommunication with the first sensor, and to generate firstclassification data assigning a classification to elements of the imagesin the first sequence, wherein the first classification data includes(i) a first confidence value that a first element of one or more firstimages in the first sequence is of a first type and (ii) a secondconfidence value that the first element is of a second type; a secondsensor to produce a second sequence of images of a second field of viewin the real space, the first field of view overlapping with the secondfield of view; a second image processor in communication with the secondsensor, and to generate second classification data assigning aclassification to elements of images in the second sequence, wherein thesecond classification data includes (i) a third confidence value that asecond element of one or more second images in the second sequence is ofthe first type and (ii) a fourth confidence value that the secondelement is of the second type; and logic coupled to the first and secondimage processing engines to use the first and second classification datafor images having overlapping field of view to identify subjects in thereal space.
 2. The system of claim 1, wherein the first image processingengine comprises a first convolutional neural network, and the secondimage processing engine comprises a second convolutional neural network.3. The system of claim 1, including logic to process the firstclassification data to specify bounding boxes which include images ofhands of the identified subjects in images in the first sequences ofimages.
 4. The system of claim 1, wherein the first and secondclassification data include coordinates of elements on the images in thefirst and second sequences of images, and the logic maps the coordinatesof elements of two or more images having a common classification, tothree-dimensional coordinates to identify locations in real space.
 5. Asystem for tracking subjects in an area of real space, comprising: afirst sensor to produce a first sequence of images of a first field ofview in the real space; a first image processor in communication withthe first sensor, and to generate first classification data assigning aclassification to elements of the images in the first sequence; a secondsensor to produce a second sequence of images of a second field of viewin the real space, the first field of view overlapping with the secondfield of view; a second image processor in communication with the secondsensor, and to generate second classification data assigning aclassification to elements of images in the second sequence, wherein thefirst and second classification data classifies elements of the imagesas types of joints; and logic coupled to the first and second imageprocessing engines to use the first and second classification data forimages having overlapping field of view to identify subjects in the realspace.
 6. The system of claim 5, including logic to track locations ofsubjects in the area of real space using classification data from thefirst and second image processors for images in the first and secondsequences of images.
 7. The system of claim 5, wherein theclassification data includes confidence arrays for elements of theimages, where a confidence array for a particular element of an imageincludes confidence values for a plurality of joint types for theparticular element.
 8. A system for tracking subjects in an area of realspace, comprising: a first sensor to produce a first sequence of imagesof a first field of view in the real space; a first image processor incommunication with the first sensor, and to generate firstclassification data assigning a classification to elements of the imagesin the first sequence; a second sensor to produce a second sequence ofimages of a second field of view in the real space, the first field ofview overlapping with the second field of view; a second image processorin communication with the second sensor, and to generate secondclassification data assigning a classification to elements of images inthe second sequence; and logic coupled to the first and second imageprocessing engines to use the first and second classification data forimages having overlapping field of view to identify subjects in the realspace, wherein the logic identifies subjects by linking sets of elementsof first and second images from the first and second sequences ofimages, respectively, to define constellations of joints for theidentified subjects.
 9. The system of claim 1, wherein the first andsecond sensors are configured to generate synchronized sequences ofimages.
 10. The system of claim 1, wherein the first and secondclassification data classifies elements of the images as types ofjoints, and the logic identifies subjects by linking sets of elements ofthe images to define constellations of joints for the identifiedsubjects.
 11. The system of claim 10, including logic to projectlocations of joints in the constellation of joints for an identifiedsubject to coordinates in a particular image in the first sequence ofimages, and to identify portions of the particular image including handsof the identified subject.
 12. The system of claim 11, including a thirdimage processor to generate classification data of elements of theidentified portions of the particular image.
 13. A method for trackingsubjects in an area of real space, comprising: receiving a firstsequence of images of a first field of view in the real space;generating first classification data assigning a classification toelements of the images in the first sequence, wherein the firstclassification data includes confidence arrays for elements of one ormore images in the first sequence, where a first confidence array for afirst element of an image in the first sequence includes (i) a firstconfidence value that the particular element is of a first type and (ii)a second confidence value that the particular element is of a secondtype; receiving a second sequence of images of a second field of view inthe real space, the first field of view overlapping with the secondfield of view; generating second classification data assigning aclassification to elements of images in the second sequence, wherein thesecond classification data includes confidence arrays for elements ofone or more images in the second sequence, where a second confidencearray for a second element of an image in the first sequence includes(i) a third confidence value that the second element is of the firsttype and (ii) a fourth confidence value that the second element is ofthe second type; and using the first and second classification data forimages having overlapping field of view to identify subjects in the realspace.
 14. The method of claim 13, including generating the firstclassification data using a first convolutional neural network, andgenerating the second classification data using a second convolutionalneural network.
 15. The method of claim 13, including processing thefirst classification data to specify bounding boxes which include imagesof hands of the identified subjects in images in the first sequences ofimages.
 16. The method of claim 13, wherein the first and secondclassification data include coordinates of elements on the images in thefirst and second sequences of images, and including mapping thecoordinates of elements of two or more images having a commonclassification, to three-dimensional coordinates to identify locationsin real space.
 17. A method for tracking subjects in an area of realspace, comprising: receiving a first sequence of images of a first fieldof view in the real space; generating first classification dataassigning a classification to elements of the images in the firstsequence; receiving a second sequence of images of a second field ofview in the real space, the first field of view overlapping with thesecond field of view; generating second classification data assigning aclassification to elements of images in the second sequence, wherein thefirst and second classification data classifies elements of the imagesas joints of a subject; and using the first and second classificationdata for images having overlapping field of view to identify subjects inthe real space.
 18. The method of claim 17, including tracking locationsof subjects in the area of real space using the first and secondclassification data from images in the first and second sequences ofimages.
 19. The method of claim 17, wherein the classification dataincludes confidence arrays for elements of the images, where aconfidence array for a particular element of an image includesconfidence values for a plurality of joint types for the particularelement.
 20. A method for tracking subjects in an area of real space,comprising: receiving a first sequence of images of a first field ofview in the real space; generating first classification data assigning aclassification to elements of the images in the first sequence;receiving a second sequence of images of a second field of view in thereal space, the first field of view overlapping with the second field ofview; generating second classification data assigning a classificationto elements of images in the second sequence; and using the first andsecond classification data for images having overlapping field of viewto identify subjects in the real space, wherein identifying subjects inthe real space comprises identifying subjects by linking sets ofelements of first and second images from the first and second sequencesof images, respectively, to define constellations of joints for theidentified subjects.
 21. The method of claim 13, wherein the first andsecond sequences of images are synchronized.
 22. The method of claim 13,wherein the first and second classification data classifies elements ofthe images as types of joints.
 23. The method of claim 22, includingprojecting locations of joints in the constellation of joints for anidentified subject to coordinates in a particular image in the firstsequence of images, and identifying portions of the particular imageincluding hands of the identified subject.
 24. The method of claim 23,including generating classification data of elements of the identifiedportions of the particular image.
 25. A non-transitory computer readablestorage medium impressed with computer program instructions to tracksubjects in an area of real space, the instructions when executed on aprocessor, implement a method comprising: receiving a first sequence ofimages of a first field of view in the real space; generating firstclassification data assigning a classification to elements of the imagesin the first sequence, wherein the first classification data includesconfidence arrays for elements of one or more images in the firstsequence, where a confidence array for a particular element of an imagein the first sequence includes (i) a first confidence value that theparticular element is of a first type and (ii) a second confidence valuethat the particular element is of a second type; receiving secondclassification data assigning a classification to elements of images ina second sequence of images having a second field of view, the secondfield of view at least in part overlapping with the first field of view;and using the first and second classification data for images havingoverlapping field of view to identify subjects in the real space. 26.The non-transitory computer readable storage medium of claim 25, themethod including generating the first classification data using a firstconvolutional neural network.
 27. The non-transitory computer readablestorage medium of claim 25, the method including processing the firstclassification data to specify bounding boxes which include images ofhands of the identified subjects in images in the first sequences ofimages.
 28. The non-transitory computer readable storage medium of claim25, wherein the first and second classification data include coordinatesof elements on the images in the first and second sequences of images,and the method includes mapping the coordinates of elements of two ormore images having a common classification, to three-dimensionalcoordinates to identify locations in real space.
 29. The non-transitorycomputer readable storage medium of claim 25, wherein the first andsecond classification data classifies elements of the images as jointsof a subject.
 30. The non-transitory computer readable storage medium ofclaim 29, the method including tracking locations of subjects in thearea of real space using the first and second classification data fromimages in the first and second sequences of images.
 31. Thenon-transitory computer readable storage medium of claim 29, wherein theconfidence array for the particular element of an image includesconfidence values for a plurality of joint types for the particularelement, the first type and the second type being two of the pluralityof joint types.
 32. The non-transitory computer readable storage mediumof claim 25, the method including identifying subjects by linking setsof elements of first and second images from the first and secondsequences of images, respectively, to define constellations of jointsfor the identified subjects.
 33. The non-transitory computer readablestorage medium of claim 25, wherein the first and second classificationdata classifies elements of the images as types of joints, and themethod includes identifying subjects by linking sets of elements of theimages to define constellations of joints for the identified subjects.34. The non-transitory computer readable storage medium of claim 33, themethod including projecting locations of joints in the constellation ofjoints for an identified subject to coordinates in a particular image inthe first sequence of images, and identifying portions of the particularimage including hands of the identified subject.
 35. The non-transitorycomputer readable storage medium of claim 34, the method includinggenerating classification data of elements of the identified portions ofthe particular image.
 36. The system of claim 1, wherein: the firstelement of the one or more first images in the first sequence and thesecond element of the one or more second images in the second sequenceare both representative of a same subject present in the real space,wherein the subject is present in the overlapping field of view of thefirst and second sensors; and the logic is to use the first, second,third and fourth confidence values to identify the subject in the realspace.